/*-----begin change by wangwei-----------*/
//the whole file is changed to delete the progma SECTION
/*-----end change------------------------*/
void DisplayMsg ( void );
void DisplayTestStatus ( void );
void DisplayTestRegs ( void );
void  ExecTestCmdEntry ( void );
#ifndef PNEU_KEY_OBJECTS
#define PNEU_KEY_OBJECTS
typedef enum { Wizard, Prove, Blessed, Moron, Idiot, Gone,
 /* oven  */  Icap,
 /* f inl */  F_Inlet, FI_PS, FI_FS, FI_Flow,FI_Calib,
 /* b inl */  B_Inlet, BI_PS, BI_FS, BI_Flow,BI_Calib,
 /* col 1 */  Column1, C1_Setpt, C1_Actual,
 /* col 2 */  Column2, C2_Setpt, C2_Actual,
 /* f det */  F_Det,   FD_G1, FD_G1_V, FD_G2, FD_G2_V, FD_G3, FD_G3_V, FD_Calib,
 /* b det */  B_Det,   BD_G1, BD_G1_V, BD_G2, BD_G2_V, BD_G3, BD_G3_V, BD_Calib,
 /* aux   */  Aux3, Aux4, Aux5, Aux3_V, Aux4_V, Aux5_V,PA_Calib,
 /* sig 1 */  /* jump to det diagnostics */
 /* sig 2 */  Environment,
 /* cc 1  */  TComp,
 /* cc 2  */  PComp,
 /* temp  */  Temp, Temp2,
 /* pres  */  Pres,
 /* flow  */  Stable_Volts,
 /* d ctrl*/  Env, Test_Status, Test_Regs,
 /* ramp  */  Max_Min, Env_Max_Min, RMS_Ctrl,
 /* status*/  Sig_Status, Pneu_Status,
 /* mode  */  Aux3_Ready, Aux4_Ready, Aux5_Ready,
 /* info  */  Pcb_Buffer, Sent, Recvd,
 /* clear */  Step,
 /* time  */  Masks, Halts,
 /* post  */  ReCalib,
 /* runlog*/  FI_P_Ready, FI_F_Ready, BI_P_Ready, BI_F_Ready,
 /* front */  FD_1F_Ready, FD_1P_Ready, FD_2F_Ready, FD_2P_Ready, FD_3F_Ready, FD_3P_Ready,
 /* option*/  /* step again */
 /* back  */  BD_1F_Ready, BD_1P_Ready, BD_2F_Ready, BD_2P_Ready, BD_3F_Ready, BD_3P_Ready,
 /* config*/  Pcb,
 /* delete*/  Confirm, EEprom, Erasing, Error_Calibrated,
 /* load  */  Load,
 /* method*/  Meth_Errors,
 /* t tbl */  FI_Hdr, FI_Therm, FI_PS_Terms, FI_FS_Parms, FI_SPR,
 /* f inj */  FD_Hdr, FD_Therm, FD_PS_1, FD_PS_2, FD_PS_3, FD_Frit_1, FD_Frit_2, FD_Frit_3,
 /* valve */  AX_Hdr, Aux_Therm, A3_PS, A4_PS, A5_PS,
 /* seq c */  Credits,      /* was reboot with memory reset */
 /* store */    /* jump to pneu diagnostics   */
 /* seq   */  Cksum,
 /* c tbl */  BI_Hdr, BI_Therm, BI_PS_Terms, BI_FS_Parms, BI_SPR,
 /* b inj */  BD_Hdr, BD_Therm, BD_PS_1, BD_PS_2, BD_PS_3, BD_Frit_1, BD_Frit_2, BD_Frit_3
 /* tray  */    /* reboot quick */
 /* ameth */    /* leave pneu_keys */
              } PNEU_KEY_DISPLAY_OBJECT;
#endif
extern const char * const Pneu_Messages[];
extern const U_INT16 Det_Ready_Msg_No[2][2][3][2];
extern const char * const Modules[];
extern const char * const Pneu_Inlet_Types[];
extern const char * const P_Sensor_Types[];
extern const char * const F_Sensor_Types[];
extern const char * const Pneu_Det_Types[];
extern const char * const EEprom_Det_Types[];
extern const char * const EEprom_Aux_Types[];
extern const char * const Valve_Types[];
extern const char * const Gas_Types[];
extern const char * const  On_Off_Labels[];
extern const char * const  My_Digits[];
extern const char * const  Pres_Names[];
extern const char * const  Ready_States[];
extern const char * const  Broken_Str[];
extern const char  OEMGas1PresLabel[9];
extern const char  OEMGas2PresLabel[9];
extern const char  OEMGas3PresLabel[9];
extern const char  OEMGas1FlowLabel[9];
extern const char  OEMGas2FlowLabel[9];
extern const char  OEMGas3FlowLabel[9];
extern const BIT8  OEMCtl1Label[13];
extern const BIT8  OEMCtl2Label[13];
extern const BIT8  OEMCtl3Label[13];
extern const BIT8  OEMCtl4Label[13];
extern const BIT8  OEMCtl5Label[13];
extern const char  OEMDataOutLabel[13];
extern const char  OEMDataInLabel[13];
extern const char  OEMDiag1Label[13];
extern const char  OEMDiag2Label[13];
extern BIT8    Super_Wizard;
extern PNEU_KEY_DISPLAY_OBJECT  Object;
extern U_INT8  Buffer_Number;
extern U_INT8  Line;
extern U_INT8  Which_Line_Active;
extern U_INT16 EEPROM_Write_Address;
extern U_INT16 EEPROM_Write_Data;
extern U_INT8  Module;
extern U_INT8  Gas;
extern U_INT8  Type;
extern U_INT16 Programming;
extern U_INT16 Range;
extern BIT8    Prog_Result;
extern U_INT16 Data;
extern U_INT16 test_station_id;
extern U_INT16 ser_no_low;
extern U_INT16 ser_no_high;
extern U_INT16 build_date;
extern U_INT8  Active_Error_Line;
extern BIT8    Stepping;
extern BIT8    Go;
extern BIT8    Pcb_Cmd_Sent;
extern BIT8    Use_Thermal_Setpt;
extern BIT8    Actual_Equals_Setpt;
extern U_INT8  Active_Buffer_Number;
extern U_INT16 PFEW;
extern EEPROM_WRITE_STRUCT Eeprom_Pfail_Mem [ 5 ];
extern volatile INT32 COOKIE;
extern const RAMP_TYPE NativeRampType[2][15][4];
extern const U_INT8 Inlet_Channel_Map[2][2];
extern const U_INT8 Det_Channel_Map[2][3];
extern const U_INT8 Aux_Channel_Map[3];
#define MAX_LOAD_ERRORS  60
typedef struct { U_INT32 item;
                 U_INT32 current;
                 U_INT32 method;
               } METH_ERROR_ENTRY;
#pragma SECTION DATA=tcomp
extern METH_ERROR_ENTRY meth_error_list [ MAX_LOAD_ERRORS ];
extern U_INT8 meth_check_errors;
#pragma SECTION UNDO
U_INT16 RangeCheckAuxPres( pAUX_STATUS status, U_INT16 Pi );
#pragma SECTION PROG=rom3
void ControlAux  ( pAUX_STATUS status , pAUXILIARY_STATUS aux_status );
void CalcAuxPressure ( pAUX_STATUS status, pAUXILIARY_STATUS aux_status );
BIT8 CheckAuxPresReadiness( pAUX_STATUS status );
void CheckAuxReadiness( pAUX_STATUS status );
void  SlamAuxSetpt ( pAUX_STATUS status );
void  SlamAuxPresSetpt ( U_INT16 pressure, pAUX_STATUS status );
void TwiddleAuxSetptChangedFlag ( pAUX_STATUS status );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
INT32 GetFritOffsetDispUnits( INT16 offset, U_INT16 temp, U_INT16 atm_pres, pDET_GAS gas_table );
INT32 GetFritOffsetDcUnits( INT16 offset, U_INT16 temp, U_INT16 atm_pres, pDET_GAS gas_table );
INT32 GetMaxFritOffset( U_INT16 temp, pDET_GAS gas_table);
UI_ERR ValidateFritOffset( INT16 offset, U_INT16 temp, U_INT16 atm_pres, pDET_GAS  gas_table );
INT16 CalcFritCalibOffset ( U_INT16 measured, pDET_GAS  gas_table, U_INT16 temp );
U_INT32 GetFritFlowRequiredToCalibrate( pFRIT_STRUCT frit );
BIT8 EnoughFritFlowToCalibrate ( U_INT32 flow, pFRIT_STRUCT frit, U_INT32 IU_Scaling );
INT32 GetFlowOffsetDispUnits( INT16 offset, U_INT32 IU_Scaling, pFLOW_SENSOR_STRUCT sensor, U_INT16 temp );
INT32 GetFlowOffsetDcUnits( INT16 offset, U_INT32 IU_Scaling, pFLOW_SENSOR_STRUCT sensor, U_INT16 temp );
INT16 GetMinFlowOffset( pFLOW_SENSOR_STRUCT sensor, U_INT16 temp );
INT16 GetMaxFlowOffset( void );
UI_ERR ValidateFlowOffset( INT16 offset, U_INT32 IU_Scaling, pFLOW_SENSOR_STRUCT sensor, U_INT16 temp );
INT16 CalcFlowCalibOffset ( U_INT16 measured, pINLET_STATUS status, U_INT16 temp );
U_INT32 GetFlowRequiredToCalibrate( pFLOW_SENSOR_STRUCT sensor );
BIT8 EnoughFlowToCalibrate ( U_INT32 flow, pFLOW_SENSOR_STRUCT sensor, U_INT32 IU_Scaling );
INT32 GetPresOffsetDispUnits( INT16 offset, U_INT16 Dcm2_Per_IU, pPRES_SENSOR_STRUCT sensor, U_INT16 temp );
INT32 GetPresOffsetDcUnits( INT16 offset, U_INT16 Dcm2_Per_IU, pPRES_SENSOR_STRUCT sensor, U_INT16 temp );
INT16 GetMaxPresOffset( pPRES_SENSOR_STRUCT sensor, U_INT16 temp );
UI_ERR ValidatePresOffset( INT16 offset, U_INT16 Dcm2_Per_IU, pPRES_SENSOR_STRUCT sensor, U_INT16 temp );
INT16 CalcPresCalibOffset ( U_INT16 measured, pPRES_SENSOR_STRUCT sensor, U_INT16 temp );
U_INT16 GetPresRequiredToCalibrate( pPRES_SENSOR_STRUCT sensor );
BIT8 EnoughPresToCalibrate ( U_INT16 pres, pPRES_SENSOR_STRUCT sensor, U_INT16 Dcm2_Per_IU );
U_INT16 CalcCalibGain ( U_INT32 current_value, U_INT32 measured_value, U_INT16 gain );
UI_ERR ValidatePresCalibGain ( U_INT16 gain );
UI_ERR ValidateFlowCalibGain ( U_INT16 gain );
UI_ERR ValidateFritCalibGain ( U_INT16 gain );
BIT8 WriteUserCalib ( U_INT8 module_number, pCALIB_STRUCT calib );
BIT8 WriteUserCalibDisabled ( U_INT8 module_number );
BIT8 WriteUserCalibEnabled ( U_INT8 module_number );
BIT8 ReadUserCalib ( U_INT8 module_number, pCALIB_STRUCT calib );
BIT8 WriteFactoryCalib ( U_INT8 module_number, pCALIB_STRUCT calib );
BIT8 WriteFactoryPos1Offset ( U_INT8 module_number, INT16 offset );
BIT8 WriteUserPos2Offset ( U_INT8 module_number, INT16 offset );
BIT8 ReadFactoryCalib ( U_INT8 module_number, pCALIB_STRUCT calib );
BIT8 ScratchUserCalib ( U_INT8 module_number );
void ReadCalibDate ( U_INT8 module_number, DATETIME *calib_date );
BIT8 ReadAutoCalOffset ( pINLET_STATUS status, pCALIB_STRUCT calib );
BIT8 SaveAutoCalOffset ( pINLET_STATUS status, INT16 offset );
BIT8 WriteUserCalibDate ( U_INT8 module_number, DATETIME date );
CALIB_STATE  ReadCalibState ( U_INT8 module_number );
void TrashModule ( U_INT8 module );
void ReadCalib  ( U_INT8 module_number, pCALIB_STRUCT calib, CALIB_STATE *state );
void LoadInletCalib ( pINLET_STATUS status );
void SaveInletCalib ( pINLET_STATUS status );
void SaveInletFactoryCalib ( pINLET_STATUS status );
void ScratchInletCalib ( pINLET_STATUS status );
void DisableInletCalib ( pINLET_STATUS status );
void EnableInletCalib ( pINLET_STATUS status );
void LoadDetCalib ( pDETECTOR_STATUS status );
void SaveDetCalib ( pDETECTOR_STATUS status );
void SaveDetFactoryCalib ( pDETECTOR_STATUS status );
void ScratchDetCalib ( pDETECTOR_STATUS status );
void DisableDetCalib ( pDETECTOR_STATUS status );
void EnableDetCalib ( pDETECTOR_STATUS status );
void LoadAuxCalib ( pAUXILIARY_STATUS status );
void SaveAuxCalib ( pAUXILIARY_STATUS status );
void SaveAuxFactoryCalib ( pAUXILIARY_STATUS status );
void ScratchAuxCalib ( pAUXILIARY_STATUS status );
void DisableAuxCalib ( pAUXILIARY_STATUS status );
void EnableAuxCalib ( pAUXILIARY_STATUS status );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
void CalcColumnP( pCOLUMN_STATUS status, U_INT16 oven_temp );
U_INT16 CalcColumnInitP( pCOLUMN_STATUS status );
void CalcColumnF( pCOLUMN_STATUS status, U_INT16 oven_temp );
U_INT16  FindSourcePressureWithColumns ( SOURCE_CONNECTION source, U_INT16 p_scale, U_INT16 oven_temp );
U_INT32 GetTotalColumnF( SOURCE_CONNECTION source, U_INT32 iu_scaling, U_INT16 oven_temp );
U_INT32 GetCol1F( SOURCE_CONNECTION source, U_INT32 iu_scaling, U_INT32 max, BIT8 *ovf, U_INT16 oven_temp );
U_INT32 GetCol2F( SOURCE_CONNECTION source, U_INT32 iu_scaling, U_INT32 max, BIT8 *ovf, U_INT16 oven_temp );
U_INT32 GetTotalColumnFlowActual( SOURCE_CONNECTION source, U_INT32 iu_scaling );
void OverideColumnSetpt ( U_INT16 pres, pCOLUMN_STATUS status, U_INT16 p_scale );
void OverideColumnFlowSetpt ( U_INT32 flow, pCOLUMN_STATUS status, U_INT32 iu_scaling, U_INT8 delay1, U_INT8 delay2 );
void CalcColNtpAndRealValue ( U_INT16 NTP_Pi, U_INT16 Real_Pi, pCOLUMN_STATUS status, U_INT16 oven_temp );
void CalcColNtpAndRealActuals ( U_INT16 NTP_Pi, U_INT16 Real_Pi, pCOLUMN_STATUS status, U_INT16 oven_temp );
U_INT16 CorrectForAtmospheric ( U_INT16 NTP_Pi, SOURCE_CONNECTION source, U_INT32 *correct_ratio, U_INT16 oven_temp, BIT8 calc_new_reference, BIT8 over_ridden );
U_INT16 CorrectToNTP ( U_INT16 Pi, SOURCE_CONNECTION source, U_INT32 *actual_correct_ratio, U_INT16 oven_temp, U_INT32 setpt_correct_ratio );
U_INT32 AdjustFlowToNTP( U_INT32 flow, U_INT32 correct_ratio );
U_INT32 AdjustNtpFlow( U_INT32 flow, U_INT32 correct_ratio );
void CalcColumnActuals ( pCOLUMN_STATUS status, U_INT16 oven_temp );
U_INT16 GetColumnPresSetptIu( pCOLUMN_STATUS status, U_INT16 oven_temp );
U_INT32 FindTotalColumnFlow ( SOURCE_CONNECTION source, U_INT16 Pi, U_INT16 oven_temp, U_INT32 iu_scaling,
                              U_INT32 max, BIT8 *ovf );
U_INT32 CalcTotalColumnFlowNTP ( SOURCE_CONNECTION source, U_INT16 Pi, U_INT16 oven_temp, U_INT32 iu_scaling );
U_INT32 FindTotalOutletFlow ( OUTLET_CONNECTION outlet, U_INT32 iu_scaling );
void  SlamColumnSetpt( U_INT32 setpt, pCOLUMN_STATUS status );
void SlamSourceSetpt ( pCOLUMN_STATUS status );
void PeriodicPresCorrect( void );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
BIT8 DefinedColumn( pCOLUMN_STATUS status );
void ConfigureColumn( pCOLUMN_STATUS status );
BIT8 AllColumnsOnThisSourceDefined( SOURCE_CONNECTION source );
BIT8 AllColumnsOnThisOutletDefined( OUTLET_CONNECTION outlet );
BIT8 SourceControlledByColumn ( SOURCE_CONNECTION source );
void ReconfigurePneu(void);
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
void JamOffsetFilter ( U_INT32 *filter, U_INT16 value );
void OffsetFilter ( U_INT32 *filter, U_INT16 value );
INT16 GetFilteredOffset ( U_INT32 *filter );
U_INT16 SubtractAdcOffset( U_INT16 volts );
U_INT16 AddAdcOffset( U_INT16 volts );
U_INT16 PresToVolts ( U_INT16 pressure, pPRES_SENSOR_STRUCT sensor, U_INT16 module_temp, INT16 calib_offset, U_INT16 calib_gain );
U_INT16 VoltsToPres ( U_INT16 volts, pPRES_SENSOR_STRUCT sensor, U_INT16 module_temp, INT16 calib_offset, U_INT16 calib_gain );
U_INT16 FlowToVolts ( U_INT32 flow, pFLOW_SENSOR_STRUCT sensor, U_INT16 module_temperature, INT16 calib_offset, U_INT16 calib_gain );
U_INT32 VoltsToFlow ( U_INT16 volts, pFLOW_SENSOR_STRUCT sensor, U_INT16 module_temperature, INT16 calib_offset, U_INT16 calib_gain );
U_INT16 FritFlowToPres ( U_INT32 desired_flow, pFRIT_STRUCT frit, U_INT16 module_temperature, U_INT16 atm_pres );
U_INT32  FritPresToFlow ( U_INT16 pres, pFRIT_STRUCT frit, U_INT16 module_temperature, U_INT16 atm_pres );
U_INT16 VoltsToAtmPres( U_INT16 volts );
#pragma SECTION UNDO
void InitSolenoidValveDrive(void);
void NonEpcPneuControl(void);
void PneuControl(void);
void SolenoidValveDrive(void);
#pragma SECTION PROG=rom3
void DetermineMakeupFlow ( pDETECTOR_STATUS status );
void DoDetGasSetpt ( pDET_GAS gas_status, pDETECTOR_STATUS status, U_INT8 gas_num );
void DoDetGasActual ( pDET_GAS gas_status, pDETECTOR_STATUS status );
void DoDetGases ( pDETECTOR_STATUS status );
void CalcDetGasFP ( pDETECTOR_STATUS status );
INT32 DetFlowReadyCheck( pDETECTOR_STATUS status, U_INT8 gas_channel  );
INT32 DetPresReadyCheck( pDETECTOR_STATUS status, U_INT8 gas_channel  );
void CheckEpcDetectorReadiness( pDETECTOR_STATUS status );
void CheckManualDetectorReadiness( pDETECTOR_STATUS status );
void CheckDetectorReadiness( pDETECTOR_STATUS status );
#pragma SECTION UNDO
void CheckForDeadPcb( void );
void ClearPneuExceptions( void );
void ShutDownSmallZoneThermal ();
void LowTCDRefCheck(pDETECTOR_STATUS status );
void HandleShutdowns ( U_INT16 shutdown );
void MonitorSensorNoise( void );
void SaveSensorReadings( pQUEUE_ENTRY buffer );
void PneuDisplay (void);
void FormatHexShort ( U_INT16  num, char *string );
void PneuFatalError (U_INT16 source, U_INT16 reason );
BIT8 ModuleExists( U_INT16 module );
BIT8 ReadModuleType( U_INT16 module, U_INT16 *type );
BIT8 ReadModuleVersion( U_INT16 module, U_INT16 *version );
BIT8 ValidModuleCksum( U_INT16 module );
void ReadSensorRange( U_INT8 module, U_INT8 sensor_position, U_INT16 *sensor_range );
void ReadPresScaling( U_INT8 module, U_INT8 position, U_INT16 *dcm2_per_iu );
void ReadFlowScaling( U_INT8 module, U_INT8 position, U_INT32 *iu_scaling );
void ReadPurgeFlowScaling( U_INT8 module, U_INT32 *iu_scaling );
void GetNlGainQualifiers( U_INT8 module, U_INT16 type, GAS_TYPE gas, U_INT16 sensor_position,
                          U_INT16 *mult, U_INT16 *div, U_INT16 *offset );
BIT8 GetAndSendFactoryInletPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendUserInletPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendFactoryDetPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendUserDetPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendFactoryAuxPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendUserAuxPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendInletPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendDetPids( pDETECTOR_STATUS status , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
BIT8 GetAndSendAuxPids( U_INT16 module , U_INT16 channel, U_INT16 sensor_position, GAS_TYPE gas );
void DownloadInletPids( pINLET_STATUS status );
void DownloadDetPids( pDETECTOR_STATUS status );
void DownloadAuxPids( pAUX_STATUS status );
void DoInlet( pINLET_STATUS status );
void DoDetector( pDETECTOR_STATUS status );
void DoNonEpcDet( pDETECTOR_STATUS status );
void DoPneuAux( pAUXILIARY_STATUS status );
void ValidateInletConfig ( pINLET_STATUS status );
void ValidateColumnConfig ( pCOLUMN_STATUS status );
BIT8 OddCombos( EEPROM_DET_TYPE pneu_id , DET_TYPE card_id );
void ValidateDetectorConfig ( pDETECTOR_STATUS status );
void ValidateAuxConfig ( pAUX_STATUS status );
void ValidatePneuConfig(void);
void InitializePneumatics(void);
void DoInletTComp( pINLET_STATUS status );
void DeterminePneuConfig( void );
void SetupPneuAuxRamp( pAUX_STATUS status );
void SetupPneuColRamp( pCOLUMN_STATUS status );
void SetupPneuRamps(void);
void GetOEMDetFritFlags ( void );
void PneuStartup(void);
BIT8 PneuKeyShortcutEnabled( void );
void TestPneuKeyShortcut( void );
U_INT16 GetCurrentOvenTemp ( void );
U_INT16 GetOvenInitTemp ( void );
U_INT32 CalcSeptumPurgeFlow ( pINLET_STATUS status, U_INT16 Pi );
#pragma SECTION PROG=rom3
BIT8 CheckForMiserMode( pINLET_STATUS status );
void CheckForLowMiserFlow( void );
BIT8 CheckForInletPurge( pINLET_STATUS status );
BIT8 CheckForVIFlowMode( pINLET_STATUS status );
BIT8 CheckForSolventVent( pINLET_STATUS status );
BIT8 EmitSolventVentWarning( pINLET_STATUS status );
BIT8 EmitInletPurgeWarning( pINLET_STATUS status );
BIT8 CheckForPressurePulse( pINLET_STATUS status );
U_INT16  ColumnPressureCompensation( pINLET_STATUS status, U_INT16 Pi, U_INT16 oven_temp );
U_INT16 RangeCheckPres( pINLET_STATUS status, U_INT16 Pi );
U_INT32 RangeCheckFlow( pINLET_STATUS status, U_INT32 flow );
void ManualSplitSplitless( pINLET_STATUS status );
void DetermineInletPressure ( pINLET_STATUS status );
void DetermineGerstelPtvPressure ( pINLET_STATUS status );
U_INT32 FindSSInletFlows ( pINLET_STATUS status );
U_INT32 FindGerstelInletFlows ( pINLET_STATUS status );
U_INT32 FindPPInletFlows ( pINLET_STATUS status );
U_INT32 FindVIInletFlows ( pINLET_STATUS status );
void DetermineInletFlows( pINLET_STATUS status );
void DetermineGerstelPtvFlows( pINLET_STATUS status );
void SplitSplitless( pINLET_STATUS      status );
void GerstelPTV( pINLET_STATUS      status );
void PTVInlet( pINLET_STATUS status );
void CoolOnColumn   ( pINLET_STATUS status );
void PurgedPacked   ( pINLET_STATUS status );
void Volatiles( pINLET_STATUS      status );
void JackInTheBox   ( pINLET_STATUS status );
void CalcInletCurrentPres( pINLET_STATUS status );
void CalcSSInletCurrentFlows( pINLET_STATUS status );
void CalcCOCInletCurrentFlows( pINLET_STATUS status );
void CalcPPInletCurrentFlows( pINLET_STATUS status );
void CalcJackInTheBoxFP( pINLET_STATUS status );
void EvalPneuReady( pHERE_I_COME ready,
                            BIT8 force_not_ready,
                            BIT8 shutdown,
                            BIT8 in_bounds,
                            BIT8 controlling,
                            BIT8 ignore,
                         U_INT16 timeout,
                         U_INT16 equib_time
                  );
U_INT16 GetReadyTimeout   ( pINLET_STATUS status );
BIT8 CheckInletPresReadiness( pINLET_STATUS status );
BIT8 CheckInletFlowReadiness( pINLET_STATUS status );
void CheckInletReadiness( pINLET_STATUS status );  /* NOTE !! this is called IMMEDIATELY after the inlet driver */
                                                  /*         The call is from PneuControl in p_ctrl .          */
void CheckInletReadinessAtStart( void );
void SlamInletPresSetpt( U_INT32 setpt, pINLET_STATUS status );
void SlamInletSetpt( pINLET_STATUS status );
void TwiddleInletSetptChangedFlag ( pINLET_STATUS status );
void Filter16Bits( U_INT16 *filter, U_INT16 value, U_INT16 rate );
void Filter32Bits( U_INT32 *filter, U_INT32 value, U_INT16 rate );
#pragma SECTION UNDO
void QueueInit(void);
pQUEUE_HEAD GetResponseQueuePtr(void);
void WaitForPneuResponse(void);
#pragma SECTION PROG=rom3
float GetViscosityExponent( GAS_TYPE gas_type );
U_INT16 GetAmbientPressure( U_INT16 Dcm2_Per_IU );
U_INT16 GetOutletPressure( pCOLUMN_STATUS status );
U_INT16 GetNtpOutletPressure( pCOLUMN_STATUS status );
U_INT16 CorrectOutletPressure( pCOLUMN_STATUS status, U_INT16 Po );
U_INT16 CalcJDP ( U_INT16 Pi, U_INT16 Po_80_dcm2_per_iu );
U_INT16 CalcInletPresFromJDP ( U_INT32 j_delta_p, U_INT16 Po_80_dcm2_per_iu );
U_INT16 CalcRealMaxPres( U_INT16 range, U_INT16 Dcm2_Per_IU );
U_INT16 ViscosityReferenceTemp ( GAS_TYPE gas );
U_INT32 ReferenceViscosity ( GAS_TYPE gas);
void RescaleColumnVelocities( U_INT32 old, U_INT32 new, pCOLUMN_STATUS status );
void RescaleColumnFlows( U_INT32 old, U_INT32 new, pCOLUMN_STATUS status );
U_INT32 BuildC1( pCOLUMN_STATUS  status,
                 U_INT16         Dcm2_Per_IU,
                 GAS_TYPE        Gas_Type);
U_INT32 BuildC2( pCOLUMN_STATUS  status,
                 U_INT16         Dcm2_Per_IU,
                 GAS_TYPE        Gas_Type);
U_INT32 BuildC3( pCOLUMN_STATUS  status,
                 U_INT16         Dcm2_Per_IU,
                 GAS_TYPE        Gas_Type);
U_INT16 CalcPiFromUavg (U_INT32 u_avg, U_INT16 Oven_Temp, U_INT16 Po, pCOLUMN_STATUS status );
U_INT16 CalcPiFromVFlow (U_INT32 v_flow, U_INT16 Oven_Temp, U_INT16 Po, pCOLUMN_STATUS status );
U_INT32 CalcUavg ( pCOLUMN_STATUS status,
                   U_INT16        Oven_Temp,
                   U_INT16        P_inlet,
                   U_INT32        Po  );
U_INT32 CalcVFlow (  pCOLUMN_STATUS status,
                     U_INT16        Oven_Temp,
                     U_INT16        P_inlet,
                     U_INT16        Po  );
U_INT16 CalcPiFromPrevWVC ( pCOLUMN_STATUS status, U_INT16 Oven_Temp, U_INT16 P_25C );
U_INT16 CalcPiFromPrevWOVC ( pCOLUMN_STATUS status, U_INT16 Oven_Temp, U_INT16 P_25C );
U_INT16 CalcPiRefFromPi ( pCOLUMN_STATUS status, U_INT16 Oven_Temp, U_INT16 P_setpt );
U_INT16 CalcTempFromVFlow (U_INT32 v_flow, U_INT16 Pm, U_INT16 Po, pCOLUMN_STATUS status );
UI_ERR  CalibDiamFromFlow( pCOLUMN_STATUS status );
UI_ERR CalibDiamFromTime ( pCOLUMN_STATUS status );
UI_ERR CalibLengthFromFlow ( pCOLUMN_STATUS status );
UI_ERR CalibLengthFromTime ( pCOLUMN_STATUS status );
UI_ERR CalibLengthAndDiam ( pCOLUMN_STATUS status );
#pragma SECTION UNDO
void ExecutePcbCommand ( pQUEUE_ENTRY buffer );
U_INT16 CheckIfPcbIsAlive(void);
void DownloadSetpoints(void);
BIT8 DownloadPids( U_INT16 channel,
                   U_INT16 p_gain,
                   U_INT16 i_gain,
                   U_INT16 d_gain,
                   U_INT16 nl_gain );
BIT8 PcbPerformSelftest( U_INT16 *result );
BIT8 ReadEeprom( U_INT16 module, U_INT16 address, U_INT16 *value );
BIT8 PrimitiveWriteEeprom( U_INT16 module, U_INT16 address, U_INT16 value );
BIT8 WriteEeprom( U_INT16 module, U_INT16 address, U_INT16 value );
void WriteDutyCycle( U_INT16 channel, U_INT16 value );
void EndFixedDutyCycle( U_INT16 channel );
BIT8 ReadDutyCycles( void );
void ForegroundReadDutyCycles( void );
BIT8 PcbPoke( U_INT16 address, U_INT32 value );
void RequestEnvironment(void);
void InitializeEnvironment(void);
  /*  W A R N I N G !!   SendPcbCmd limitation:                 */
  /* cmd_array and response array must be at least 16 elements! */
BIT8 SendPcbCmd( U_INT16 *cmd_array, U_INT16 *resp_array );
BIT8 PcbPeek( U_INT16 address, U_INT32 *value );
BIT8 RestartChannel ( U_INT16 channel_mask );
void CheckIfRetryNeeded( pQUEUE_ENTRY buffer );
void QuickRestartChannel ( U_INT16 channel_mask, U_INT16 allowed_retries );
BIT8 RestartAllChannels ( void );
void RequestICapCounters(void);
BIT8 PneuChecksumError ( pQUEUE_ENTRY buffer );
void AddChecksum ( pQUEUE_ENTRY buffer );
BIT8 CheckResponse( pQUEUE_ENTRY buffer );
void ActualEqualsSetpt( pQUEUE_ENTRY buffer );
void UpdateEnvironmentals( pQUEUE_ENTRY buffer );
void InitEnvironmentalVars( pQUEUE_ENTRY buffer );
void SaveModuleCksums( pQUEUE_ENTRY buffer );
void CompleteModuleWrite( U_INT8 module, U_INT16 *calc_cksum );
U_INT16 CalcModuleChecksum( U_INT8 module );
#pragma SECTION PROG=boot
void InitPneuConfig(void);
void LinkPneuStructs(void);
#pragma SECTION UNDO
void InitPneuStatus(void);
void InitPneuStores(void);
void *GetRampInfoPtr( /*pCOLUMN_STATUS*/void *status );
void MakeThisADirtball( void );
void UpdateShadowedSetpts ( void );
#pragma SECTION PROG=rom3
U_INT16 FindTrueTemp ( pTHERMISTOR_PARMS parms, U_INT16 volts );
BIT8 GetThermisterConstants ( U_INT8 module_number, pTHERMISTOR_PARMS parms );
void BuildThermistorTable ( U_INT8 module_number, pTHERMISTOR_STRUCT thermistor_table );
void BuildDefaultThermistorTable ( pTHERMISTOR_STRUCT thermistor_table );
void FindFlowMasks ( U_INT32 max_flow, U_INT16 table_size,
                     U_INT32 *mask, U_INT32 *entry_spacing, U_INT16 *shift_value, U_INT32 IU_Scaling );
void GetPresSensorConstants ( U_INT8 module_number, U_INT8 gas_num, pPRES_SENSOR_PARMS parms );
void ReadDetMaxFlowRates ( pDETECTOR_STATUS status, U_INT8 gas_num );
void ReadDetGasMaxFlowRates ( pDETECTOR_STATUS status );
void GetFritConversionConst ( U_INT8 module, U_INT8 gas_num, GAS_TYPE gas_type, float *alpha_conv, float *beta_conv );
void ReBuildDetGasCompTable ( pDETECTOR_STATUS status, U_INT16 gas_num );
void DoDetCompTables( pDETECTOR_STATUS status );
BIT8 ReadFlowSensorConstants ( pINLET_STATUS status, GAS_TYPE gas,  pFLOW_SENSOR_PARMS parms );
U_INT16 CalcFlowToVolts ( pFLOW_SENSOR_PARMS parms, float flow );
void InitFlowTempCompTable( pINLET_STATUS status );
void InitPresTempComp( pINLET_STATUS status );
void InitPurgeRegComp ( pINLET_STATUS status );
UI_ERR ReadPurgeRegComp ( pINLET_STATUS status, GAS_TYPE gas, U_INT32 *flow, INT32 *df_dp );
void RebuildInletCompTables( pINLET_STATUS status );
void DoAuxCompTables( pAUXILIARY_STATUS status );
void GetGas_2MinFlowRate ( pDETECTOR_STATUS status, U_INT8 module_number );
#pragma SECTION UNDO
INT16 ReadInletCalFlowOffset ( pINLET_STATUS status );
UI_ERR SaveInletCalFlowOffset ( pINLET_STATUS status, INT16 offset );        /* from manually invoked flow calib */
UI_ERR AutoSaveInletFlowOffset ( pINLET_STATUS status, INT16 offset );      /* from post-run auto-invoked flow calib */
UI_ERR SaveFsCalOffset ( pINLET_STATUS status, INT16 offset, BIT8 auto_cal );
void RequestFlowSensorAutoZero();
void BkgrndRequestFsZero( pINLET_STATUS status, BIT8 data_comm );
void AutoZeroFlowSensors( U_INT32 parm );
void ZeroFlowSensor( pINLET_STATUS status, U_INT32 data_comm );
U_INT8 CountInletChangeRequests ( pINLET_STATUS status );
U_INT8 CountDetChangeRequests ( pDETECTOR_STATUS status, U_INT8 gas_num );
U_INT8 CountAuxChangeRequests ( pAUX_STATUS status );
void SendInletGasChangeRequest( pINLET_STATUS status, GAS_TYPE gas );
void   SendDetGasChangeRequest( pDETECTOR_STATUS status, U_INT8 gas_num, GAS_TYPE gas );
void SendAuxGasChangeRequest( pAUX_STATUS status, GAS_TYPE gas );
void SendInletCalibRequest( pINLET_STATUS status );
void SendDetCalibRequest( pDETECTOR_STATUS status );
void SendPneuAuxCalibRequest( );
void SendInletDisableUserRequest( pINLET_STATUS status );
void SendDetDisableUserRequest( pDETECTOR_STATUS status );
void SendPneuAuxDisableUserRequest(  );
void SendInletEnableUserRequest( pINLET_STATUS status );
void SendDetEnableUserRequest( pDETECTOR_STATUS status );
void SendPneuAuxEnableUserRequest(  );
void SendInletScratchRequest( pINLET_STATUS status );
void SendDetScratchRequest( pDETECTOR_STATUS status );
void SendPneuAuxScratchRequest(  );
void SendSensorNoiseRequest();
void SendExecTestCmdRequest( );
void SendGasTaskCmd( U_INT8 cmd, U_INT32 parm );
void ProcessGasTaskCmd ( pGAS_TASK_MSG buffer );
#pragma SECTION PROG=rom3
INT32 GetAuxPresActual( pAUX_STATUS status );
INT32 GetAuxPresSetpt( pAUX_STATUS status );
INT32 DcGetAuxPresActual( pAUX_STATUS status );
INT32 DcGetAuxPresSetpt( pAUX_STATUS status );
UI_ERR ValidateAuxPresSetpt ( INT32 setpt , pAUX_STATUS status );
UI_ERR SetAuxPresSetpt( INT32 setpt, pAUX_STATUS status );
UI_ERR DcSetAuxPresSetpt( INT32 setpt, pAUX_STATUS status );
void ChangeAuxPresSetpt( U_INT16 pres, INT32 setpt, pAUX_STATUS status, U_INT16 oven_temp );
void UpdateAuxPresStatus( U_INT16 setpt_iu, pAUX_STATUS status, U_INT16 dcm2_per_iu );
void UpdateAuxPresSetpt( U_INT16 setpt_iu, pAUX_STATUS status, U_INT16 dcm2_per_iu );
ON_OFF GetAuxState ( pAUX_STATUS status );
ON_OFF GetAuxWkfileState ( pAUX_STATUS status );
UI_ERR SetAuxState ( ON_OFF state, pAUX_STATUS status );
void ChangeAuxState ( ON_OFF state, pAUX_STATUS status );
UI_ERR DcRTTGetValidAux3Pres ( INT32 setpt, U_INT16 *pres_iu );
UI_ERR DcRTTGetValidAux4Pres ( INT32 setpt, U_INT16 *pres_iu );
UI_ERR DcRTTGetValidAux5Pres ( INT32 setpt, U_INT16 *pres_iu );
UI_ERR RTTGetValidAux3Pres ( INT32 setpt, U_INT16 *pres_iu );
UI_ERR RTTGetValidAux4Pres ( INT32 setpt, U_INT16 *pres_iu );
UI_ERR RTTGetValidAux5Pres ( INT32 setpt, U_INT16 *pres_iu );
INT32 DcRTTGetAux3PresDisplay ( U_INT16 pres_iu );
INT32 DcRTTGetAux4PresDisplay ( U_INT16 pres_iu );
INT32 DcRTTGetAux5PresDisplay ( U_INT16 pres_iu );
INT32 RTTGetAux3PresDisplay ( U_INT16 pres_iu );
INT32 RTTGetAux4PresDisplay ( U_INT16 pres_iu );
INT32 RTTGetAux5PresDisplay ( U_INT16 pres_iu );
void RTTSetAux3Pres ( INT32 p_iu );
void RTTSetAux4Pres ( INT32 p_iu );
void RTTSetAux5Pres ( INT32 p_iu );
void ResetAuxPres ( pAUX_STATUS status );
void ResetAuxPressures ( void );
BIT8 PneuAuxPresent ( void );
INT32 GetAuxMaxPres( pAUX_STATUS status );
INT32 GetAuxMaxPresIu( pAUX_STATUS status, U_INT16 dcm2_per_iu );
INT32 GetAuxRealMaxPresIu( pAUX_STATUS status, U_INT16 dcm2_per_iu );
INT32 DcGetAuxMaxPres( pAUX_STATUS status );
GAS_TYPE GetAuxGasType ( pAUX_STATUS status );
UI_ERR ValidAuxGasType(  GAS_TYPE gas );
UI_ERR ValidateAuxGasType( pAUX_STATUS status, GAS_TYPE gas );
UI_ERR SetAuxGasType ( GAS_TYPE gas, pAUX_STATUS status );
INT32 GetAuxPresEquibTime ( pAUX_STATUS status );
INT32 DcGetAuxPresEquibTime ( pAUX_STATUS status );
UI_ERR ValidateAuxPresEquibTime ( INT32 time, pAUX_STATUS status );
UI_ERR DcSetAuxPresEquibTime( INT32 time, pAUX_STATUS status );
UI_ERR SetAuxPresEquibTime( INT32 time, pAUX_STATUS status );
void ChangeAuxPresEquibTime( INT32 time, pAUX_STATUS status );
INT32 DcGetAuxCalPresGain ( pAUX_STATUS status );
INT32 GetAuxCalPresValue( pAUX_STATUS status );
INT32 DcGetAuxCalPresValue ( pAUX_STATUS status );
INT32 GetAuxCalPresZero ( pAUX_STATUS status );
INT32 DcGetAuxCalPresZero ( pAUX_STATUS status );
UI_ERR SetAuxCalPresZero ( pAUX_STATUS status );
UI_ERR DcSetAuxCalPresZero ( pAUX_STATUS status );
UI_ERR ChangeAuxCalPresZero ( pAUX_STATUS status );
UI_ERR DcSetAuxFactoryCalPresZero ( );
UI_ERR SetAuxCalPres ( pAUX_STATUS status, INT32 pres );
UI_ERR DcSetAuxCalPres ( pAUX_STATUS status, INT32 pres );
UI_ERR ChangeAuxCalPres ( pAUX_STATUS status, INT32 pres, U_INT32 pres_iu );
INT32 GetAuxMinPresReqdToCalib( pAUX_STATUS status );
DATETIME GetAuxCalibDate( pAUX_STATUS status );
UI_ERR ValidateAuxCalibState( pAUX_STATUS status, ON_OFF  state );
UI_ERR TurnOffAuxCalib( pAUX_STATUS status );
UI_ERR DcTurnOffAuxCalib( pAUX_STATUS status );
UI_ERR TurnOnAuxCalib( pAUX_STATUS status );
UI_ERR DcTurnOnAuxCalib( pAUX_STATUS status );
UI_ERR ChangeAuxCalibState( ON_OFF  state );
UI_ERR DcDeleteAuxCalib ( pAUX_STATUS status );
UI_ERR DeleteAuxCalib ( pAUX_STATUS status );
UI_ERR SendDeleteAuxCalib ( pAUX_STATUS status );
CALIB_STATE AuxUserCalibState ( pAUX_STATUS status );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
INT32 MilliSecsToRetTime( U_INT32 time );
U_INT32 RetTimeToMilliSecs ( INT32 time );
UI_ERR ValidateRetTime ( INT32  time );
void SetNewFunnyConstFlowPostPres ( pCOLUMN_STATUS status );
void UpdateFunnyConstFlowPostPres ( pCOLUMN_STATUS status, U_INT16 new_post_temp );
RAMP_TYPE GetColumnRampType ( pCOLUMN_STATUS status );
void VISamplingEndChk(pCOLUMN_STATUS col);
COL_SOURCE_TYPE GetColSrcType(pCOLUMN_STATUS col);
void ChangeRampType ( pCOLUMN_STATUS status );
void UpdateColumnSourceSetpts( pCOLUMN_STATUS status, U_INT16 new_oven_temp );
void UpdateColumnStatus ( U_INT16 pressure, U_INT16 oven_temp,  pCOLUMN_STATUS status, U_INT16 dcm2_per_iu );
void UpdateColumnSetpts ( U_INT16 pressure, U_INT16 oven_temp,  pCOLUMN_STATUS status, U_INT16 p_scale );
void UpdateColumns ( U_INT16 pres_iu, U_INT16 oven_temp,  SOURCE_CONNECTION source, U_INT16 p_scale );
void UpdateColumnsDamnIt ( U_INT16 pres_iu, U_INT16 oven_temp,  SOURCE_CONNECTION source, U_INT16 p_scale );
void UpdateColumnsStatusOnly ( U_INT16 pres_iu, U_INT16 oven_temp,  SOURCE_CONNECTION source, U_INT16 p_scale );
void UpdateColumnFlowSetpt( U_INT32 flow, pCOLUMN_STATUS status, U_INT32 scaling );
void ResetMiserMode( pCOLUMN_STATUS status );
void NewlyDefinedColumn( pCOLUMN_STATUS status );
void NewlyUnDefinedColumn( pCOLUMN_STATUS status );
BIT8  ColumnDimsKnown( pCOLUMN_STATUS  status );
INT32 GetColumnDiam( pCOLUMN_STATUS status );
INT32 GetColumnLength( pCOLUMN_STATUS status );
INT32 GetColumnFilmThickness( pCOLUMN_STATUS status );
char *DcGetColumnIdString( pCOLUMN_STATUS status );
UI_ERR DcSetColumnIdString( pCOLUMN_STATUS status, char *string);
INT32 GetColCalibMaxLengthDifference( void );
INT32 GetColCalibMaxDiamDifference ( void );
INT32 GetColMinDiam ( void );
INT32 GetColMaxDiam ( void );
INT32 GetColMinLen  ( void );
INT32 GetColMaxLen  ( void );
INT32 GetColMinFilm ( void );
INT32 GetColMaxFilm ( void );
UI_ERR ValidateCalibDiam ( pCOLUMN_STATUS status, INT32 Diam );
UI_ERR ValidateCalibLength( pCOLUMN_STATUS status, INT32 Length );
UI_ERR ValidateDiam ( INT32 Diam );
UI_ERR ValidateLength( INT32 Length );
UI_ERR ValidateFilmThickness ( INT32 thickness, pCOLUMN_STATUS status );
UI_ERR SetColumnDiam ( INT32  Diam, pCOLUMN_STATUS status );
UI_ERR DcSetColumnDiam ( INT32  Diam, pCOLUMN_STATUS status );
void ChangeColumnDiam ( INT32  diam, pCOLUMN_STATUS status );
UI_ERR SetColumnLength (  INT32  length, pCOLUMN_STATUS status );
UI_ERR DcSetColumnLength (  INT32  length, pCOLUMN_STATUS status );
void ChangeColumnLength (  INT32  length, pCOLUMN_STATUS status );
UI_ERR SetColumnFilmThickness (  INT32  thickness, pCOLUMN_STATUS status );
UI_ERR DcSetColumnFilmThickness (  INT32  thickness, pCOLUMN_STATUS status );
void ChangeColumnFilmThickness (  INT32  thickness, pCOLUMN_STATUS status );
BIT8 ColumnDefined ( pCOLUMN_STATUS status );
SOURCE_CONNECTION GetColumnSource ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnSource ( SOURCE_CONNECTION source );
UI_ERR SetColumnSource( SOURCE_CONNECTION source, pCOLUMN_STATUS status );
UI_ERR DcSetColumnSource( SOURCE_CONNECTION source, pCOLUMN_STATUS status );
UI_ERR ChangeColumnSource( SOURCE_CONNECTION source, pCOLUMN_STATUS status, U_INT16 oven_temp );
OUTLET_CONNECTION GetColumnOutlet ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnOutlet ( OUTLET_CONNECTION outlet );
UI_ERR SetColumnOutlet( OUTLET_CONNECTION outlet, pCOLUMN_STATUS status );
UI_ERR DcSetColumnOutlet( OUTLET_CONNECTION outlet, pCOLUMN_STATUS status );
void ChangeColumnOutlet( OUTLET_CONNECTION outlet, pCOLUMN_STATUS status );
ON_OFF GetColumnVacuumComp ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnVacuumComp ( ON_OFF state );
UI_ERR SetColumnVacuumComp ( ON_OFF state, pCOLUMN_STATUS status );
TRUE_FALSE ColumnOutletPresCompEnabled ( pCOLUMN_STATUS status );
INT32 GetColumnOutletPresCompSetpt ( pCOLUMN_STATUS status );
INT32 DcGetColumnOutletPresCompSetpt ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnOutletPresComp ( INT32 pres );
INT32 GetMaxColPresComp( pCOLUMN_STATUS status );
UI_ERR SetColumnOutletPresComp ( ON_OFF state, pCOLUMN_STATUS status );
UI_ERR SetColumnOutletPresCompSetpt ( INT32 pres, pCOLUMN_STATUS status );
UI_ERR DcSetColumnOutletPresCompSetpt ( INT32 pres, pCOLUMN_STATUS status );
void ChangeColumnOutletPresSetpt ( U_INT16 pres_iu, INT32 pres, pCOLUMN_STATUS status );
INT32 GetColumnHeadPres ( pCOLUMN_STATUS status );
INT32 DcGetColumnHeadPres ( pCOLUMN_STATUS status );
U_INT16 GetColumnHeadPresIu ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnHeadPres ( INT32 pressure, pCOLUMN_STATUS status );
UI_ERR  SetColumnHeadPres (INT32 pressure, pCOLUMN_STATUS status );
UI_ERR  DcSetColumnHeadPres (INT32 pressure, pCOLUMN_STATUS status );
void ChangeColumnHeadPres (U_INT16 pres_iu, INT32 pressure, pCOLUMN_STATUS status, U_INT16 oven_temp );
void UpdateColumnHeadPres (U_INT16 pres_iu, pCOLUMN_STATUS status, U_INT16 oven_temp );
INT32 DcGetColumnActualFlow( pCOLUMN_STATUS status );
INT32 GetColumnVFlowActual ( pCOLUMN_STATUS status );
INT32 DcGetColumnVFlowActual ( pCOLUMN_STATUS status );
INT32 GetColumnVFlow ( pCOLUMN_STATUS status );
INT32 DcGetColumnVFlow ( pCOLUMN_STATUS status );
U_INT32 GetColumnVFlowIu ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnVFlow ( INT32 flow, pCOLUMN_STATUS status );
UI_ERR SetColumnVFlow ( INT32 flow, pCOLUMN_STATUS status );
UI_ERR DcSetColumnVFlow ( INT32 flow, pCOLUMN_STATUS status );
void ChangeColumnVFlow ( U_INT32 flow_iu, INT32 flow, pCOLUMN_STATUS status, U_INT16 oven_temp );
void UpdateColumnVFlow ( U_INT32 flow_iu, pCOLUMN_STATUS status, U_INT16 oven_temp );
INT32 GetColumnAvgVelocity ( pCOLUMN_STATUS status );
INT32 DcGetColumnAvgVelocity ( pCOLUMN_STATUS status );
U_INT32 GetColumnAvgVelocityIu ( pCOLUMN_STATUS status );
UI_ERR ValidateColumnAvgVel ( U_INT32 vel_iu, pCOLUMN_STATUS status );
UI_ERR SetColumnAvgVel ( INT32 vel, pCOLUMN_STATUS status );
UI_ERR DcSetColumnAvgVel ( INT32 vel, pCOLUMN_STATUS status );
void ChangeColumnAvgVel ( U_INT32 vel_iu, INT32 vel, pCOLUMN_STATUS status );
CONTROL_MODE GetColumnControlMode( pCOLUMN_STATUS status );
UI_ERR ValidateColumnControlMode ( CONTROL_MODE mode, pCOLUMN_STATUS status );
UI_ERR DcSetColumnControlMode ( CONTROL_MODE mode, pCOLUMN_STATUS status );
UI_ERR SetColumnControlMode ( CONTROL_MODE mode, pCOLUMN_STATUS status );
COL_SOURCE_TYPE GetColSourceType ( pCOLUMN_STATUS status );
BIT8 EpcSource ( pCOLUMN_STATUS status );
BIT8 VIFlowSourceChk ( pCOLUMN_STATUS status );
BIT8 SourcePressureControlled ( pCOLUMN_STATUS status );
INT32 GetColumnPostPres ( pCOLUMN_STATUS status );
INT32 DcGetColumnPostPres ( pCOLUMN_STATUS status );
UI_ERR  SetColumnPostPres (INT32 pres, pCOLUMN_STATUS status );
UI_ERR  DcSetColumnPostPres (INT32 post_value, pCOLUMN_STATUS status );
void ChangeColumnPostPres (U_INT16 pres_iu, INT32 pres, pCOLUMN_STATUS status );
INT32 GetColumnPostFlow ( pCOLUMN_STATUS status );
INT32 DcGetColumnPostFlow ( pCOLUMN_STATUS status );
UI_ERR  SetColumnPostFlow (INT32 flow, pCOLUMN_STATUS status );
UI_ERR  DcSetColumnPostFlow (INT32 flow, pCOLUMN_STATUS status );
void ChangeColumnPostFlow (U_INT32 flow_iu, INT32 flow, pCOLUMN_STATUS status );
GAS_TYPE GetColumnGasType ( pCOLUMN_STATUS status );
ON_OFF GetColumnSourceState ( pCOLUMN_STATUS status );
UI_ERR SetColumnSourceState ( pCOLUMN_STATUS status, ON_OFF state );
void ChangeColumnSourceState ( pCOLUMN_STATUS status, ON_OFF state );
INT32 GetSourceMaxPres( pCOLUMN_STATUS status );
U_INT16 GetSourceMaxPresIu( pCOLUMN_STATUS status );
U_INT16 GetSourceRealMaxPresIu( pCOLUMN_STATUS status );
INT32 GetSourceMaxFlow( pCOLUMN_STATUS status, U_INT16 temp );
U_INT32 GetSourceMaxFlowIu( pCOLUMN_STATUS status, U_INT16 temp );
CALIB_MODE GetColumnCalibMode ( pCOLUMN_STATUS status );
UI_ERR SetColumnCalibMode ( pCOLUMN_STATUS status, CALIB_MODE mode );
void   ChangeColumnCalibMode ( pCOLUMN_STATUS status, CALIB_MODE mode );
void   UpdateColumnCalibMode ( pCOLUMN_STATUS status, CALIB_MODE mode );
INT32 GetColumnCalibHoldTime ( pCOLUMN_STATUS status );
INT32 DcGetColumnCalibHoldTime ( pCOLUMN_STATUS status );
UI_ERR ValidateCalibHoldTime ( INT32 time );
UI_ERR SetColumnCalibHoldTime ( pCOLUMN_STATUS status, INT32 time );
UI_ERR DcSetColHoldTime ( pCOLUMN_STATUS status, INT32 time );
UI_ERR ChangeColumnCalibHoldTime ( pCOLUMN_STATUS status, INT32 time );
INT32 GetColumnCalibMeasFlow ( pCOLUMN_STATUS status );
INT32 DcGetColMeasFlow ( pCOLUMN_STATUS status );
UI_ERR SetColumnCalibMeasFlow ( pCOLUMN_STATUS status, INT32 flow );
UI_ERR DcSetColMeasFlow ( pCOLUMN_STATUS status, INT32 flow_dcu );
UI_ERR ChangeColMeasFlow ( pCOLUMN_STATUS status, U_INT32 flow );
INT32 GetColumnCalibLength ( pCOLUMN_STATUS status );
INT32 GetColumnCalibDiam ( pCOLUMN_STATUS status );
INT32 DcGetColumnCalibMode ( pCOLUMN_STATUS status );
UI_ERR ValidateColCalibMode( CALIB_MODE mode );
UI_ERR DcSetColCalibMode( pCOLUMN_STATUS status, CALIB_MODE mode );
DATETIME GetColumnCalibDate ( pCOLUMN_STATUS status );
INT32 DcGetColCalibDate( pCOLUMN_STATUS status );
INT32 DcGetColCalibLength ( pCOLUMN_STATUS status );
INT32 DcGetColCalibDiam ( pCOLUMN_STATUS status );
UI_ERR SetColumnCalibDiam( pCOLUMN_STATUS status, INT32 diam );
void UpdateColumnCalibDiam( pCOLUMN_STATUS status, INT32 diam );
UI_ERR SetColumnCalibLength( pCOLUMN_STATUS status, INT32 length );
void UpdateColumnCalibLength( pCOLUMN_STATUS status, INT32 length );
UI_ERR DcAcceptCalibMode( pCOLUMN_STATUS status, INT32 mode );
UI_ERR DcAcceptColMeasFlow( pCOLUMN_STATUS status, INT32 flow );
UI_ERR DcAcceptColHoldTime( pCOLUMN_STATUS status, INT32 time );
UI_ERR DcAcceptCalibDate( pCOLUMN_STATUS status, INT32 seconds );
UI_ERR DcAcceptCalibDiam( pCOLUMN_STATUS status, INT32 diam );
UI_ERR DcAcceptCalibLength( pCOLUMN_STATUS status, INT32 length );
BIT8 IsColumnCalibrated ( pCOLUMN_STATUS status );
UI_ERR CalibrateColumnDiameter( pCOLUMN_STATUS status );
UI_ERR CalibrateColumnLength( pCOLUMN_STATUS status );
UI_ERR CalColLengthAndDiam( pCOLUMN_STATUS status );
UI_ERR OkToCalibColumn( pCOLUMN_STATUS status );
void UpdateColumnPostValues( void );
UI_ERR EstimatedMinimumPeakWidth ( pCOLUMN_STATUS status, INT32 *peak_width );
void SourceSetptChanged( SOURCE_CONNECTION source );
INT32 GetColumnInitPres( pCOLUMN_STATUS status );
INT32 GetColumnInitFlow( pCOLUMN_STATUS status );
INT32 GetColumnInitVel ( pCOLUMN_STATUS status );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
INT32 GetColRampMaxFinalFlow ( );
U_INT32 GetColRampMaxFinalFlowIu ( pCOLUMN_STATUS status );
UI_ERR ValidateColRampFinalFlow ( INT32 final_flow, pCOLUMN_STATUS status );
void RangeCheckColumnFlowRamp( pCOLUMN_STATUS status );
void RangeCheckColumnPresRamp( pCOLUMN_STATUS status );
void RangeCheckColumnRamps( pCOLUMN_STATUS status );
INT32 GetColInitPres (pCOLUMN_STATUS status);
INT32 DcGetColInitPres (pCOLUMN_STATUS status);
/**begin_proto**/
UI_ERR SetColInitPres (pCOLUMN_STATUS status, INT32 pres);
UI_ERR DcSetColInitPres (pCOLUMN_STATUS status, INT32 pres);
void ChangeColInitPres (pCOLUMN_STATUS status, U_INT32 init_pres, INT32 pres, U_INT16 oven_temp );
INT32 GetColPresInitTime (pCOLUMN_STATUS status);
INT32 DcGetColPresInitTime (pCOLUMN_STATUS status);
UI_ERR SetColPresInitTime (pCOLUMN_STATUS status, INT32 time);
UI_ERR DcSetColPresInitTime (pCOLUMN_STATUS status, INT32 time );
void ChangeColPresInitTime (pCOLUMN_STATUS status, INT32 time);
INT32 GetColPresRate (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColPresRate (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColPresRate (pCOLUMN_STATUS status, INT32 setpt, U_INT8 rampnum);
UI_ERR DcSetColPresRate (pCOLUMN_STATUS status, INT32 setpt, U_INT8 rampnum);
void ChangeColPresRate (pCOLUMN_STATUS status, U_INT32 rate, INT32 setpt, U_INT8 rampnum);
INT32 GetColPresFinalVal (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColPresFinalVal (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColPresFinalVal (pCOLUMN_STATUS status, INT32 pres, U_INT8 rampnum);
UI_ERR DcSetColPresFinalVal (pCOLUMN_STATUS status, INT32 pres, U_INT8 rampnum);
void ChangeColPresFinalVal (pCOLUMN_STATUS status, U_INT32 pres_final_val, INT32 pres, U_INT8 rampnum);
INT32 GetColPresFinalTime (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColPresFinalTime (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColPresFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
UI_ERR DcSetColPresFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
void ChangeColPresFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
INT32 GetColInitFlow (pCOLUMN_STATUS status);
INT32 DcGetColInitFlow (pCOLUMN_STATUS status);
/**begin_proto**/
UI_ERR SetColInitFlow (pCOLUMN_STATUS status, INT32 flow);
UI_ERR DcSetColInitFlow (pCOLUMN_STATUS status, INT32 flow);
void ChangeColInitFlow (pCOLUMN_STATUS status, U_INT32 init_flow, INT32 flow, U_INT16 oven_temp );
INT32 GetColFlowInitTime (pCOLUMN_STATUS status);
INT32 DcGetColFlowInitTime (pCOLUMN_STATUS status);
UI_ERR SetColFlowInitTime (pCOLUMN_STATUS status, INT32 time);
UI_ERR DcSetColFlowInitTime (pCOLUMN_STATUS status,INT32 time );
void ChangeColFlowInitTime (pCOLUMN_STATUS status, INT32 time);
INT32 GetColFlowRate (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColFlowRate (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColFlowRate (pCOLUMN_STATUS status, INT32 setpt, U_INT8 rampnum);
UI_ERR DcSetColFlowRate (pCOLUMN_STATUS status, INT32 setpt, U_INT8 rampnum);
void ChangeColFlowRate (pCOLUMN_STATUS status, U_INT32 rate, INT32 setpt, U_INT8 rampnum);
INT32 GetColFlowFinalVal (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColFlowFinalVal (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColFlowFinalVal (pCOLUMN_STATUS status, INT32 flow, U_INT8 rampnum);
UI_ERR DcSetColFlowFinalVal (pCOLUMN_STATUS status, INT32 flow, U_INT8 rampnum);
void ChangeColFlowFinalVal (pCOLUMN_STATUS status, U_INT32 flow_final_val, INT32 flow, U_INT8 rampnum);
INT32 GetColFlowFinalTime (pCOLUMN_STATUS status, U_INT8 rampnum);
INT32 DcGetColFlowFinalTime (pCOLUMN_STATUS status, U_INT8 rampnum);
UI_ERR SetColFlowFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
UI_ERR DcSetColFlowFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
void ChangeColFlowFinalTime (pCOLUMN_STATUS status, INT32 time, U_INT8 rampnum );
INT32 GetAuxInitPres (pAUX_STATUS status);
INT32 DcGetAuxInitPres (pAUX_STATUS status);
/**begin_proto**/
UI_ERR SetAuxInitPres (pAUX_STATUS status, INT32 pres);
UI_ERR DcSetAuxInitPres (pAUX_STATUS status, INT32 pres);
void ChangeAuxInitPres (pAUX_STATUS status, U_INT32 init_pres, INT32 pres);
INT32 GetAuxPresInitTime (pAUX_STATUS status);
INT32 DcGetAuxPresInitTime (pAUX_STATUS status);
UI_ERR SetAuxPresInitTime (pAUX_STATUS status, INT32 time);
UI_ERR DcSetAuxPresInitTime (pAUX_STATUS status, INT32 time );
void ChangeAuxPresInitTime (pAUX_STATUS status, INT32 time);
INT32 GetAuxPresRate (pAUX_STATUS status, U_INT8 rampnum);
INT32 DcGetAuxPresRate (pAUX_STATUS status, U_INT8 rampnum);
UI_ERR SetAuxPresRate (pAUX_STATUS status, INT32 setpt, U_INT8 rampnum);
UI_ERR DcSetAuxPresRate (pAUX_STATUS status, INT32 setpt, U_INT8 rampnum);
void ChangeAuxPresRate (pAUX_STATUS status, U_INT32 rate, INT32 setpt, U_INT8 rampnum);
INT32 GetAuxPresFinalVal (pAUX_STATUS status, U_INT8 rampnum);
INT32 DcGetAuxPresFinalVal (pAUX_STATUS status, U_INT8 rampnum);
UI_ERR SetAuxPresFinalVal (pAUX_STATUS status, INT32 pres, U_INT8 rampnum);
UI_ERR DcSetAuxPresFinalVal (pAUX_STATUS status, INT32 pres, U_INT8 rampnum);
void ChangeAuxPresFinalVal (pAUX_STATUS status, U_INT32 pres_final_val, INT32 pres, U_INT8 rampnum);
INT32 GetAuxPresFinalTime (pAUX_STATUS status, U_INT8 rampnum);
INT32 DcGetAuxPresFinalTime (pAUX_STATUS status, U_INT8 rampnum);
UI_ERR SetAuxPresFinalTime (pAUX_STATUS status, INT32 time, U_INT8 rampnum );
UI_ERR DcSetAuxPresFinalTime (pAUX_STATUS status, INT32 time, U_INT8 rampnum );
void ChangeAuxPresFinalTime (pAUX_STATUS status, INT32 time, U_INT8 rampnum );
U_INT16 CalcTempFromTime( INT32 time );
void ConvertPresRampToFlowRamp( pCOLUMN_STATUS status );
void ConvertFlowRampToPresRamp( pCOLUMN_STATUS status );
#pragma SECTION UNDO
#pragma SECTION PROG=rom3
UI_ERR ValidateSetVIPort( pINLET_STATUS status, PNEU_PORT_STATE state  );
UI_ERR SetVISplitPort ( pINLET_STATUS status, PNEU_PORT_STATE state );
PNEU_PORT_STATE GetVISplitPort ( pINLET_STATUS status );
void SetDefaultVentConfig ( pINLET_STATUS status );
GAS_TYPE GetInletGasType( pINLET_STATUS status );
UI_ERR ValidateInletGasType( pINLET_STATUS status, GAS_TYPE gas );
UI_ERR SetInletGasType( GAS_TYPE gas, pINLET_STATUS status );
UI_ERR DcSetInletGasType( GAS_TYPE gas, pINLET_STATUS status );
UI_ERR ChangeInletGasType( GAS_TYPE gas, pINLET_STATUS status );
BIT8 GetInletAutoCal ( pINLET_STATUS status );
UI_ERR ValidateInletAutoCal( BIT8 mode, pINLET_STATUS status );
UI_ERR SetInletAutoCal ( BIT8 mode, pINLET_STATUS status );
void ChangeInletAutoCal ( BIT8 mode, pINLET_STATUS status );
ON_OFF GetInletMiserMode ( pINLET_STATUS status );
UI_ERR ValidateInletMiserMode( ON_OFF mode, pINLET_STATUS status );
void   FixMiserTime ( pINLET_STATUS status );
UI_ERR SetInletMiserMode ( ON_OFF mode, pINLET_STATUS status );
void ChangeInletMiserMode ( ON_OFF mode, pINLET_STATUS status );
INT32 GetInletFlowEquibTime ( pINLET_STATUS status );
INT32 DcGetInletFlowEquibTime ( pINLET_STATUS status );
UI_ERR ValidateInletFlowEquibTime ( INT32 time, pINLET_STATUS status );
UI_ERR SetInletFlowEquibTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetInletFlowEquibTime( INT32 time, pINLET_STATUS status );
void ChangeInletFlowEquibTime( U_INT32 time, pINLET_STATUS status );
INT32 GetInletPresEquibTime ( pINLET_STATUS status );
INT32 DcGetInletPresEquibTime ( pINLET_STATUS status );
UI_ERR ValidateInletPresEquibTime ( INT32 time, pINLET_STATUS status );
UI_ERR SetInletPresEquibTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetInletPresEquibTime( INT32 time, pINLET_STATUS status );
void ChangeInletPresEquibTime( U_INT32 time, pINLET_STATUS status );
INT32 GetInletPSensorRange( pINLET_STATUS status );
INT32 GetDetPSensorRange( pDETECTOR_STATUS status, U_INT8 gas_num );
U_INT32 GetAuxPSensorRange( pAUX_STATUS status );
U_INT16 GetDetPresScale( pDETECTOR_STATUS status, U_INT8 gas_num );
U_INT16 GetAuxPresScale( pAUX_STATUS status );
U_INT16 GetInletPresScale( pINLET_STATUS status );
U_INT32 GetInletFlowScale( pINLET_STATUS status );
U_INT32 GetDetFlowScale( pDETECTOR_STATUS status, U_INT8 gas_num );
U_INT16 GetColumnPresScale( pCOLUMN_STATUS status );
U_INT32 GetColumnFlowScale( pCOLUMN_STATUS status );
#pragma SECTION UNDO
#define  FID_FUEL_GAS 1
#define  FID_AIR_GAS  2
#define  FID_MUG_GAS  3
#define  FPD_FUEL_GAS 1
#define  FPD_AIR_GAS  2
#define  FPD_MUG_GAS  3
#define  NPD_FUEL_GAS 1
#define  NPD_AIR_GAS  2
#define  NPD_MUG_GAS  3
#define  TCD_REF_GAS  2
#define  TCD_MUG_GAS  3
#define  ECD_ANODE_PURGE_GAS 2
#define  ECD_MUG_GAS  3
#define  CalPres Flow
#pragma SECTION PROG=rom3
BIT8 DetHasColumn( pDETECTOR_STATUS status );
INT32 GetDetectorPresActual( pDETECTOR_STATUS  status, INT8  gas );
INT32 DcGetDetectorPresActual( pDETECTOR_STATUS  status, INT8  gas );
INT32 GetDetectorGasFlowActual( pDETECTOR_STATUS  status, INT8  gas );
INT32 DcGetDetectorGasFlowActual( pDETECTOR_STATUS  status, INT8  gas );
INT32 GetDetGasWkfileFlowSetpt( pDETECTOR_STATUS  status, INT8  gas );
INT32 DcGetDetGasWkfileFlowSetpt( pDETECTOR_STATUS  status, INT8  gas );
INT32 GetDetectorGasFlowSetpt( pDETECTOR_STATUS  status, INT8  gas );
INT32 DcGetDetectorGasFlowSetpt( pDETECTOR_STATUS  status, INT8  gas );
INT32 GetDetectorGasPresSetpt( pDETECTOR_STATUS  status, INT8  gas );
INT32 DcGetDetectorGasPresSetpt( pDETECTOR_STATUS  status, INT8  gas );
void ChangeDetPresSetpt( U_INT16 pres, INT32 setpt, pDETECTOR_STATUS status, BIT8 gas );
UI_ERR ValidateDetPresSetpt ( INT32 setpt, pDETECTOR_STATUS  status, BIT8  gas );
UI_ERR SetDetPresSetpt( INT32 setpt, pDETECTOR_STATUS status, BIT8 gas  );
UI_ERR DcSetDetPresSetpt( INT32 setpt, pDETECTOR_STATUS status, BIT8 gas  );
UI_ERR SetDetectorGasFlowSetpt( INT32 setpt, pDETECTOR_STATUS  status, INT8  gas );
UI_ERR DcSetDetectorGasFlowSetpt( INT32 setpt, pDETECTOR_STATUS  status, INT8  gas );
UI_ERR ValidateDetFlowSetpt ( INT32 setpt, pDETECTOR_STATUS  status, INT8  gas );
void ChangeDetFlowSetpt  ( INT32 setpt, U_INT32 flow, pDETECTOR_STATUS  status, INT8  gas );
void PutDetAirSetptImmed( INT32 setpt, pDETECTOR_STATUS  status ); /* setpt in units of 0.1 ml/min */
ON_OFF GetDetGasState ( pDETECTOR_STATUS status, U_INT8 gas );
ON_OFF GetDetGasWkfileState ( pDETECTOR_STATUS status, U_INT8 gas );
UI_ERR SetDetGasState ( ON_OFF state, pDETECTOR_STATUS status, U_INT8 gas );
#pragma SECTION UNDO
void UpdateDetGasState ( ON_OFF state, pDETECTOR_STATUS status, U_INT8 gas );
#pragma SECTION PROG=rom3
ON_OFF GetDetConstMkupMode ( pDETECTOR_STATUS status );
UI_ERR SetDetConstMkupMode (ON_OFF state, pDETECTOR_STATUS status );
INT32 GetConstMakeupFlowSetpt ( pDETECTOR_STATUS status );
INT32 GetMaxComboFlow ( pDETECTOR_STATUS status );
INT32 DcGetConstMakeupFlowSetpt ( pDETECTOR_STATUS status );
UI_ERR SetConstMakeupFlowSetpt ( INT32 flow, pDETECTOR_STATUS status );
UI_ERR DcSetConstMakeupFlowSetpt ( INT32 flow, pDETECTOR_STATUS status );
UI_ERR ChangeConstMakeupFlowSetpt ( U_INT32 flow_iu, INT32 flow, pDETECTOR_STATUS status );
BIT8   DetIsTCDorAnyECD ( pDETECTOR_STATUS status );
BIT8   DetIsAnyUECD   ( pDETECTOR_STATUS status );
UI_ERR ValidateDetectorGasType ( pDETECTOR_STATUS status, U_INT8 gas, GAS_TYPE gas_type );
GAS_TYPE GetDetectorGasType ( pDETECTOR_STATUS status, U_INT8 gas );
UI_ERR SetDetectorGasType ( pDETECTOR_STATUS status, U_INT8 gas, GAS_TYPE gas_type );
#pragma SECTION UNDO
void DetGasOFF ( POSITION position , U_INT8 gas );
void DetGasON ( POSITION position, U_INT8 gas );
void SetDetDutyCycle( POSITION position, U_INT8 gas, U_INT8 duty_cycle );
void SetDetGasIgnitionFlow( POSITION position, U_INT8 gas, U_INT32 flow );
void StartDetIgnitionSeq( POSITION position );
void EndDetIgnitionSeq( POSITION position );
GAS_TYPE DetGasType( POSITION p );
#pragma SECTION PROG=rom3
INT32 DcGetDetCalFlowGain ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 DcGetDetCalPresGain ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetCalFlowZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 DcGetDetCalFlowZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetCalFlow ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 DcGetDetCalPresValue( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetCalPresValue( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetMinPresReqdToCalib( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetMaxPres( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetDetCalPresZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 DcGetDetCalPresZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
UI_ERR SetDetCalPresZero ( pDETECTOR_STATUS status, U_INT8 gas_num  );
UI_ERR DcSetDetCalPresZero ( pDETECTOR_STATUS status, U_INT8 gas_num  );
UI_ERR ChangeDetCalPresZero ( pDETECTOR_STATUS status, U_INT8 gas_num  );
UI_ERR SetDetCalPres ( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 pres );
UI_ERR DcSetDetCalPres ( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 pres );
UI_ERR ChangeDetCalPres ( pDETECTOR_STATUS status, pDET_GAS gas_table, U_INT8 chnl, INT32 pres, U_INT32 pres_iu );
INT32 DcGetDetCalFlow ( pDETECTOR_STATUS status, U_INT8 gas_num );
UI_ERR SetDetCalFlowZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
UI_ERR DcSetDetCalFlowZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
UI_ERR ChangeDetCalFlowZero ( pDETECTOR_STATUS status, U_INT8 gas_num );
UI_ERR DcSetDetFactoryCalFlowZero ( pDETECTOR_STATUS status );
UI_ERR SetDetCalFlow ( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 flow );
UI_ERR DcSetDetCalFlow ( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 flow );
UI_ERR ChangeDetCalFlow ( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 flow, U_INT32 flow_iu );
INT32 GetMinFritFlowReqdToCalib ( pDETECTOR_STATUS status, U_INT8 gas_num );
DATETIME GetDetCalibDate( pDETECTOR_STATUS status );
UI_ERR ValidateDetCalibState( pDETECTOR_STATUS status, ON_OFF  state );
UI_ERR TurnOffDetCalib( pDETECTOR_STATUS status );
UI_ERR DcTurnOffDetCalib( pDETECTOR_STATUS status );
UI_ERR TurnOnDetCalib( pDETECTOR_STATUS status );
UI_ERR DcTurnOnDetCalib( pDETECTOR_STATUS status );
UI_ERR ChangeDetCalibState( pDETECTOR_STATUS status, ON_OFF  state );
UI_ERR DeleteDetCalib ( pDETECTOR_STATUS status );
UI_ERR DcDeleteDetCalib ( pDETECTOR_STATUS status );
UI_ERR SendDeleteDetCalib ( pDETECTOR_STATUS status );
CALIB_STATE DetUserCalibState ( pDETECTOR_STATUS status );
BIT8 EpcDetector( pDETECTOR_STATUS  status );
BIT8 DCEpcDetector( pDETECTOR_STATUS  status );
BIT8 ManDetector( pDETECTOR_STATUS  status );
BIT8 IsDetectorEpc( POSITION position );
BIT8 DCIsDetectorEpc( POSITION position );
EEPROM_DET_TYPE GetDetType( pDETECTOR_STATUS status );
INT32  DcGetDetFuelGasMaxFlowRate( pDETECTOR_STATUS status, GAS_TYPE gas_type );
INT32  DcGetDetUtilGasMaxFlowRate( pDETECTOR_STATUS status, GAS_TYPE gas_type );
INT32  DcGetDetMugGasMaxFlowRate( pDETECTOR_STATUS status, GAS_TYPE gas_type );
OEM_GAS_STATUS  GetDetGasStatus( pDETECTOR_STATUS status, BIT8 gas );
void RTTSetFrntDetFuelState( INT32 state );
void RTTSetBackDetFuelState( INT32 state );
void RTTResetDetectorStates( void );
#pragma SECTION UNDO
INT32 CountsToMilliVolts( U_INT16 counts );
INT32 CountsTo100MicroVolts( U_INT16 counts );
INT32 GetDutyCycleActual ( U_INT8 channel );
INT32 GetDutyCycleSetpt ( U_INT16 channel );
UI_ERR SetDutyCycleSetpt ( U_INT8 channel, INT32 duty_cycle );
U_INT16 GetChannelAvgVoltage( U_INT16 channel );
U_INT16 GetEnvAvgVoltage( U_INT16 channel );
U_INT16 GetChannelNoise( U_INT16 channel );
U_INT16 GetEnvNoise( U_INT16 channel );
U_INT32 GetModuleSerialNumber( U_INT8 module );
void    GetModuleBuildDateParts( U_INT8 module, U_INT16 *year, U_INT8 *month, U_INT8 *day );
U_INT16 GetModuleVersion( U_INT8 module );
U_INT16 GetModuleType( U_INT8 module );
U_INT16  GetTestStationId ( U_INT8 module_number );
U_INT16 GetModuleThermistorVoltage( U_INT16 module );
UI_ERR GetEepromDefinition ( U_INT8 module, U_INT16 address, U_INT16 *value, BIT8 *definition );
U_INT8 GetPcbInletControlMode ( pINLET_STATUS status );
U_INT16 GetModuleTemp( U_INT8 module );
UI_ERR SetInletPresDutyCycleSetpt( pINLET_STATUS status, INT32 setpt );
UI_ERR SetInletFlowDutyCycleSetpt( pINLET_STATUS status, INT32 setpt );
UI_ERR SetDetPresDutyCycleSetpt( pDETECTOR_STATUS status, U_INT8 gas_num, INT32 setpt );
UI_ERR SetAuxPresDutyCycleSetpt( pAUX_STATUS status, INT32 setpt );
INT32 GetInletPresDutyCycleSetpt( pINLET_STATUS status );
INT32 GetInletFlowDutyCycleSetpt( pINLET_STATUS status );
INT32 GetDetPresDutyCycleSetpt( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPresDutyCycleSetpt( pAUX_STATUS status );
INT32 GetInletPresDutyCycleActual( pINLET_STATUS status );
INT32 GetInletFlowDutyCycleActual( pINLET_STATUS status );
INT32 GetDetPresDutyCycleActual( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPresDutyCycleActual( pAUX_STATUS status );
INT32 GetInletPresAvgVoltage( pINLET_STATUS status );
INT32 GetInletFlowAvgVoltage( pINLET_STATUS status );
INT32 GetInletGasIdAvgVoltage( pINLET_STATUS status );
INT32 GetDetPresAvgVoltage( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPresAvgVoltage( pAUX_STATUS status );
INT32 GetAuxPresVoltageSetpt( pAUX_STATUS status );
INT32 GetInletPresNoise( pINLET_STATUS status );
INT32 GetInletFlowNoise( pINLET_STATUS status );
INT32 GetDetPresNoise( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPresNoise( pAUX_STATUS status );
INT32 GetInletModuleTempNoise( pINLET_STATUS status );
INT32 GetDetModuleTempNoise( pDETECTOR_STATUS status );
INT32 GetAuxModuleTempNoise( void );
INT32 DcGetAtmosphericPressure ( void );
INT32 GetPneuAdcOffsetVoltage( void );
INT32 GetPneuAdcOffsetNoise( void );
INT32 GetPneuAdc10VoltVoltage( void );
INT32 GetPneuAdc10VoltNoise( void );
INT32 GetPneuAdc24VoltVoltage( void );
INT32 GetInletModuleSerialNumber ( pINLET_STATUS status );
INT32 GetDetModuleSerialNumber ( pDETECTOR_STATUS status );
INT32 GetAuxModuleSerialNumber ( void );
INT32  GetInletFunctional ( pINLET_STATUS status );
INT32  GetDetFunctional ( pDETECTOR_STATUS status );
INT32  GetAuxFunctional ( pAUX_STATUS status );
INT32 GetInletColFlowNTP ( pINLET_STATUS status );
INT32 GetInletPurgeFlowNTP ( pINLET_STATUS status );
INT32 GetInletSplitFlowNTP ( pINLET_STATUS status );
INT32 GetInletTotalFlowNTP ( pINLET_STATUS status );
INT32 DcGetInletColFlowNTP ( pINLET_STATUS status );
INT32 DcGetInletPurgeFlowNTP ( pINLET_STATUS status );
INT32 DcGetInletSplitFlowNTP ( pINLET_STATUS status );
INT32 DcGetInletTotalFlowNTP ( pINLET_STATUS status );
INT32 GetInletPresRange ( pINLET_STATUS status );
INT32 GetDetPresRange ( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPresRange ( pAUX_STATUS status );
INT32 CalcPredictedPsOffsetIu( pPRES_SENSOR_STRUCT sensor, U_INT16 module_temp );
INT32 CalcPredictedPsOffset( pPRES_SENSOR_STRUCT sensor, U_INT16 module_temp, INT16 calib_offset );
INT32 GetInletPredictedPsOffset( pINLET_STATUS status );
INT32 GetInletPredictedFsOffsetIu( pFLOW_SENSOR_STRUCT sensor, U_INT16 module_temp );
INT32 GetInletPredictedFsOffset( pINLET_STATUS status );
INT32 GetDetPredictedPsOffset( pDETECTOR_STATUS status, U_INT8 gas_num );
INT32 GetAuxPredictedPsOffset( pAUX_STATUS status );
BIT8 PcbIsAlive();
BIT8 IsSomethingThere( U_INT16 module );
#pragma SECTION PROG=rom3
U_INT32 CalcSplitRatioFromTotalFlow( pINLET_STATUS status, U_INT32 total_flow, U_INT16 pres, U_INT16 oven_temp );
U_INT32 CalcPurgeFlowFromTotalFlow( pINLET_STATUS status, U_INT32 total_flow );
void NewlyDefinedColOnSsInlet ( pINLET_STATUS status );
U_INT32 FindInletFlows ( pINLET_STATUS status, U_INT16 pres );
INT32 GetRealInletPresActual( pINLET_STATUS status );
INT32 GetInletPresActual( pINLET_STATUS status );
INT32 DcGetInletPresActual( pINLET_STATUS status );
INT32 GetInletPresSetpt( pINLET_STATUS status );
INT32 DcGetInletPresSetpt( pINLET_STATUS status );
INT32 DcGetInletWkfilePresSetpt( pINLET_STATUS status );
UI_ERR  SetInletPresSetpt( INT32 setpt, pINLET_STATUS status );
UI_ERR  DcSetInletPresSetpt( INT32 setpt, pINLET_STATUS status );
UI_ERR  DcSetInletPresSetptImmediate( INT32 setpt, pINLET_STATUS status );
UI_ERR ValidateInletPresSetpt ( INT32 pres, pINLET_STATUS status );
void ChangeInletPresSetpt ( U_INT16 p_iu, INT32 setpt,  pINLET_STATUS status, U_INT16 oven_temp );
void ChangeInletPresStatus( U_INT16 p_iu, INT32 setpt,  pINLET_STATUS status, U_INT16 oven_temp );
void UpdateInletPresStatus( U_INT16 p_iu,  pINLET_STATUS status, U_INT16 dcm2_per_iu );
void UpdateInletPresSetpt ( U_INT16 p_iu,  pINLET_STATUS status, U_INT16 dcm2_per_iu );
INT32 GetRealInletFlowActual( pINLET_STATUS status );
INT32 GetInletFlowActual( pINLET_STATUS status );
INT32 DcGetInletFlowActual( pINLET_STATUS status );
INT32 GetInletFlowSetpt( pINLET_STATUS status );
INT32 DcGetInletFlowSetpt( pINLET_STATUS status );
INT32 DcGetInletWkfileFlowSetpt( pINLET_STATUS status );
UI_ERR SetInletFlowSetpt( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletFlowSetpt( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletFlowSetptImmediate( INT32 flow, pINLET_STATUS status );
UI_ERR ValidateInletFlowSetpt ( INT32 flow, pINLET_STATUS status );
U_INT16 FindInletPresFromFlow ( pINLET_STATUS status, U_INT32 v_flow, U_INT16 oven_temp );
void ChangeInletFlowSetpt( U_INT32 v_flow, INT32 flow, pINLET_STATUS status );
void UpdateInletFlowSetpt( pINLET_STATUS status, U_INT32 v_flow );
void ModifyInletFlowSetpt( pINLET_STATUS status );
INJ_MODE GetInletInjectMode ( pINLET_STATUS status );
UI_ERR SetInletInjectMode( INJ_MODE state, pINLET_STATUS status );
UI_ERR DcSetInletInjectMode( INJ_MODE state, pINLET_STATUS status );
UI_ERR ValidateInletInjectMode ( INJ_MODE state, pINLET_STATUS status );
void ChgInletInjectMode( INJ_MODE state, pINLET_STATUS status, BIT8 DCflg );
void ChangeInletInjectMode( INJ_MODE state, pINLET_STATUS status );
BIT8 InletPurgeActive ( pINLET_STATUS status );
BIT8 VIInjFlowActive ( pINLET_STATUS status );
BIT8 InletPressurePulseActive ( pINLET_STATUS status );
BIT8 InletMiserModeActive ( pINLET_STATUS status );
INT32 GetInletSplitFlow ( pINLET_STATUS status );
INT32 GetMaxSplitFlow( pINLET_STATUS status, U_INT32 column_flow );
INT32 GetMinSplitFlow( pINLET_STATUS status, U_INT32 column_flow );
INT32 GetMinTotalInletFlow( pINLET_STATUS status );
INT32 DcGetInletSplitFlow ( pINLET_STATUS status );
UI_ERR SetInletSplitFlow( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletSplitFlow( INT32 flow, pINLET_STATUS status );
UI_ERR ValidateInletSplitFlow ( INT32 flow, pINLET_STATUS status, U_INT32 *column_flow );
void ChangeInletSplitFlow( U_INT32 split_flow, INT32 flow, pINLET_STATUS status, U_INT32 column_flow );
INT32 GetInletMinMiserFlow ( pINLET_STATUS status );
INT32 GetInletMiserFlow ( pINLET_STATUS status );
INT32 DcGetInletMiserFlow ( pINLET_STATUS status );
UI_ERR SetInletMiserFlow( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletMiserFlow( INT32 flow, pINLET_STATUS status );
UI_ERR ValidateInletMiserFlow ( INT32 flow, pINLET_STATUS status );
void ChangeInletMiserFlow ( U_INT32 miser_flow, INT32 flow, pINLET_STATUS status );
INT32 GetInletPurgeFlow ( pINLET_STATUS status );
INT32 DcGetInletPurgeFlow ( pINLET_STATUS status );
UI_ERR SetInletPurgeFlow( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletPurgeFlow( INT32 flow, pINLET_STATUS status );
UI_ERR ValidateInletPurgeFlow ( INT32 flow, pINLET_STATUS status );
void ChangeInletPurgeFlow ( U_INT32 purge_flow, INT32 flow, pINLET_STATUS status );
INT32 GetInletMiserTime ( pINLET_STATUS status );
UI_ERR SetInletMiserTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetInletMiserTime( INT32 time, pINLET_STATUS status );
UI_ERR ValidateInletMiserTime ( INT32 time, pINLET_STATUS status );
void ChangeInletMiserTime( INT32 time, pINLET_STATUS status );
INT32 GetInletPurgeTime ( pINLET_STATUS status );
UI_ERR SetInletPurgeTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetInletPurgeTime( INT32 time, pINLET_STATUS status );
UI_ERR ValidateInletPurgeTime ( INT32 time, pINLET_STATUS status );
void ChangeInletPurgeTime( INT32 time, pINLET_STATUS status );
INT32 GetVentPressure ( pINLET_STATUS status );
INT32 DcGetVentPressure ( pINLET_STATUS status );
UI_ERR  SetVentPressure( INT32 setpt, pINLET_STATUS status );
UI_ERR DcSetVentPressure( INT32 setpt, pINLET_STATUS status );
UI_ERR ValidateVentPres ( INT32 pres, pINLET_STATUS status );
void ChangeVentPressure ( U_INT16 pres, INT32 setpt, pINLET_STATUS status );
INT32  GetVentTime ( pINLET_STATUS status );
UI_ERR ValidateVentTime ( INT32 time, pINLET_STATUS status );
UI_ERR SetVentTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetVentTime( INT32 time, pINLET_STATUS status );
void ChangeVentTime( INT32 time, pINLET_STATUS status );
INT32 GetInletVentFlow ( pINLET_STATUS status );
INT32 DcGetInletVentFlow ( pINLET_STATUS status );
UI_ERR SetInletVentFlow( INT32 flow, pINLET_STATUS status );
UI_ERR DcSetInletVentFlow( INT32 flow, pINLET_STATUS status );
UI_ERR ValidateInletVentFlow ( INT32 flow, pINLET_STATUS status );
void ChangeInletVentFlow ( U_INT32 vent_flow, INT32 flow, pINLET_STATUS status );
UI_ERR VITypeCheck ( pINLET_STATUS statis );
INT32  GetVIInjTime ( pINLET_STATUS status );
INT32  DcGetVIInjTime ( pINLET_STATUS status );
UI_ERR ValidateVIInjTime ( INT32 time, pINLET_STATUS status );
UI_ERR SetVIInjTime( INT32 time, pINLET_STATUS status );
void   FixVIPurgeTime( pINLET_STATUS status );
UI_ERR DcSetVIInjTime( INT32 time, pINLET_STATUS status );
void ChangeVIInjTime( INT32 time, pINLET_STATUS status );
INT32 GetPressurePulsePressure ( pINLET_STATUS status );
INT32 DcGetPressurePulsePressure ( pINLET_STATUS status );
UI_ERR  SetPressurePulsePressure( INT32 setpt, pINLET_STATUS status );
UI_ERR DcSetPressurePulsePressure( INT32 setpt, pINLET_STATUS status );
UI_ERR ValidatePressurePulsePres ( INT32 pres, pINLET_STATUS status );
void ChangePressurePulsePressure ( U_INT16 pres, INT32 setpt, pINLET_STATUS status );
INT32 GetPressurePulseTime ( pINLET_STATUS status );
UI_ERR ValidatePressurePulseTime ( INT32 time, pINLET_STATUS status );
UI_ERR SetPressurePulseTime( INT32 time, pINLET_STATUS status );
UI_ERR DcSetPressurePulseTime( INT32 time, pINLET_STATUS status );
void ChangePressurePulseTime( INT32 time, pINLET_STATUS status );
INT32 GetInletSplitRatio ( pINLET_STATUS status );
INT32 GetMaxSplitRatioIu ( pINLET_STATUS status );
INT32 GetMaxSplitRatio ( pINLET_STATUS status );
INT32 GetMinSplitRatio( pINLET_STATUS status );
INT32 DcGetInletSplitRatio ( pINLET_STATUS status );
UI_ERR ValidateInletSplitRatio ( INT32 split_ratio, pINLET_STATUS status );
UI_ERR SetInletSplitRatio( INT32 split_ratio, pINLET_STATUS status );
UI_ERR DcSetInletSplitRatio( INT32 split_ratio, pINLET_STATUS status );
void ChangeInletSplitRatio ( U_INT32 split_ratio, INT32 split_ratio_display, pINLET_STATUS status );
ON_OFF GetInletState ( pINLET_STATUS status );
ON_OFF GetInletWkfileState ( pINLET_STATUS status );
UI_ERR DcSetInletState ( ON_OFF state, pINLET_STATUS status );
UI_ERR SetInletState ( ON_OFF state, pINLET_STATUS status );
void LogInletStateChange ( ON_OFF state, pINLET_STATUS status );
void ChangeInletState ( ON_OFF state, pINLET_STATUS status );
INLET_TYPE GetInletType( pINLET_STATUS status);
BIT8 GenSS( pINLET_STATUS status);
INLET_TYPE VIGetInletType( pINLET_STATUS status);
INLET_TYPE GetHonestInletType( pINLET_STATUS status);
INLET_TYPE GetInletBaseType ( pINLET_STATUS status );
UI_ERR ValidateInletType( pINLET_STATUS status, INLET_TYPE type );
UI_ERR SetInletType( pINLET_STATUS status, INLET_TYPE type );
BIT8 EpcInletChk ( pINLET_STATUS status2 );
BIT8 EpcInlet ( pINLET_STATUS status );
INT32 GetInletMaxPres( pINLET_STATUS status );
INT32 GetInletMaxFlow( pINLET_STATUS status );
INT32 GetInletMaxPresIu( pINLET_STATUS status, U_INT16 dcm2_per_iu );
INT32 GetInletRealMaxPresIu( pINLET_STATUS status, U_INT16 dcm2_per_iu );
INT32 DcGetInletCalPresGain ( pINLET_STATUS status );
INT32 GetInletCalPresZero ( pINLET_STATUS status );
INT32 DcGetInletCalPresZero ( pINLET_STATUS status );
UI_ERR SetInletCalPresZero ( pINLET_STATUS status );
UI_ERR DcSetInletCalPresZero ( pINLET_STATUS status );
UI_ERR ChangeInletCalPresZero ( pINLET_STATUS status );
UI_ERR DcSetInletFactoryCalPresZero ( pINLET_STATUS status );
UI_ERR ValidateInletCalPres ( pINLET_STATUS status, INT32 pres );
UI_ERR SetInletCalPres ( pINLET_STATUS status, INT32 pres );
UI_ERR DcSetInletCalPres ( pINLET_STATUS status, INT32 pres_dcu );
UI_ERR ChangeInletCalPres ( pINLET_STATUS status, INT32 pres, U_INT16 pres_iu );
U_INT32 GetInletCalPres ( pINLET_STATUS status );
U_INT32 DcGetInletCalPres ( pINLET_STATUS status );
INT32 GetMinPresRequiredToCalibrate ( pINLET_STATUS status );
INT32 DcGetInletCalFlowGain ( pINLET_STATUS status );
INT32 GetInletCalFlowZero ( pINLET_STATUS status );
INT32 DcGetInletCalFlowZero ( pINLET_STATUS status );
UI_ERR SetInletCalFlowZero ( pINLET_STATUS status );
UI_ERR DcSetInletCalFlowZero ( pINLET_STATUS status );
UI_ERR DcGetInletCalFlowZeroState ( pINLET_STATUS status );
U_INT32 GetInletCalFlow ( pINLET_STATUS status );
U_INT32 DcGetInletCalFlow ( pINLET_STATUS status );
UI_ERR ValidateInletCalFlow ( pINLET_STATUS status, INT32 flow );
UI_ERR SetInletCalFlow ( pINLET_STATUS status, INT32 flow );
UI_ERR DcSetInletCalFlow ( pINLET_STATUS status, INT32 flow_dcu );
UI_ERR ChangeInletCalFlow ( pINLET_STATUS status, INT32 flow, U_INT32 flow_iu );
INT32 GetMinFlowRequiredToCalibrate ( pINLET_STATUS status );
DATETIME GetInletCalibDate( pINLET_STATUS status );
UI_ERR DeleteInletCalib ( pINLET_STATUS status );
UI_ERR DcDeleteInletCalib ( pINLET_STATUS status );
UI_ERR SendDeleteInletCalib ( pINLET_STATUS status );
UI_ERR TurnOffInletCalib( pINLET_STATUS status );
UI_ERR DcTurnOffInletCalib( pINLET_STATUS status );
UI_ERR TurnOnInletCalib( pINLET_STATUS status );
UI_ERR DcTurnOnInletCalib( pINLET_STATUS status );
UI_ERR ChangeInletCalibState( pINLET_STATUS status, ON_OFF  state );
UI_ERR ValidateInletCalibState( pINLET_STATUS status, ON_OFF  state );
CALIB_STATE InletUserCalibState( pINLET_STATUS status );
BIT8 GetInletDiagMode( pINLET_STATUS status );
BIT8 GetInletSolenoidValve( pINLET_STATUS status );
void SetInletDiagMode( pINLET_STATUS status, BIT8 mode );
void SetInletSolenoidValve( pINLET_STATUS status, BIT8 mode );
INT32 GetSprFlowConst( pINLET_STATUS status, GAS_TYPE gas );
INT32 GetSprDflowConst( pINLET_STATUS status, GAS_TYPE gas );
void ResetPresReadinessStates( void );
BIT8 OkToReleaseOvenHoldOff ( pINLET_STATUS status );
BIT8  GetCPFInletTitlePresence( POSITION position );
BIT8  *GetCPFInletTitle( POSITION position );
#pragma SECTION UNDO
/* $Header: proto.h,v 2.3 03/06/24 12:26:30 przybyls Exp $ */
 /* constants used to define scaling factors between Keyboard and Flow */
#define DISPLAY_KPA_SCALE 1
#define DISPLAY_PSI_SCALE 10
#define DISPLAY_BAR_SCALE 100
#define DISPLAY_V_SCALE 1
#define DISPLAY_F_SCALE 10
#define DISPLAY_F_RATE_SCALE 100
#define DISPLAY_P_RATE_KPA_SCALE 10
#define DISPLAY_P_RATE_PSI_SCALE 100
#define DISPLAY_P_RATE_BAR_SCALE 1000
#define SPLIT_RATIO_UI_SCALE  10
#define SPLIT_RATIO_DC_SCALE  10000
#define SPLIT_RATIO_INTERNAL_SCALE 16384
#define COLUMN_DIAM_SCALING   1
#define COLUMN_LEN_SCALING    100
#define COLUMN_FILM_SCALING    100
#define MAX_SPLIT_RATIO       7500   /* not scaled */
#define MAX_SPLIT_RATIO_IU    ( MAX_SPLIT_RATIO * SPLIT_RATIO_INTERNAL_SCALE )
#define MIN_SPLIT_RATIO_IU    ( SPLIT_RATIO_INTERNAL_SCALE / 10)  /* .1 */
#define CALIB_GAIN_DC_SCALE   10000      /* xx.xx % */
#define MAX_COL_FINAL_FLOW    150
INT32 Round( INT32 num, INT8 frac_digits );
U_INT32 GetInletMaxFlowIu ( pINLET_STATUS status, U_INT32 iu_scaling );
INT32 GetRampMaxFlowRate ( void );
UI_ERR ValidateFlowRate ( INT32 rate );
INT32 GetRampMaxPresRate ( void );
UI_ERR ValidatePresRate ( INT32 rate );
INT32  GetMaxDetGasFlow( pDETECTOR_STATUS status, U_INT8 gas );
INT32  GetMinDetGasFlow( pDETECTOR_STATUS status, U_INT8 gas );
BIT8 IamAdirtball(void);
pINLET_STATUS GetFrontInletPtr(void);
pINLET_STATUS GetBackInletPtr(void);
pDETECTOR_STATUS GetFrontDetPtr(void);
pDETECTOR_STATUS GetBackDetPtr(void);
pAUX_STATUS GetAux3Ptr(void);
pAUX_STATUS GetAux4Ptr(void);
pAUX_STATUS GetAux5Ptr(void);
pCOLUMN_STATUS GetColumn1Ptr(void);
pCOLUMN_STATUS GetColumn2Ptr(void);
BIT8 InletHasColumn( pINLET_STATUS status );
PRES_UNITS GetPresUnits( void );
UI_ERR ValidatePresUnits ( PRES_UNITS units );
UI_ERR SetPresUnits ( PRES_UNITS units );
INT32 ConvertPresIuToDisplay ( U_INT32 pres_iu , U_INT16 dcm2_per_iu );
U_INT16 ConvertPresDisplayToIu ( INT32 pres , U_INT16 dcm2_per_iu );
INT32 ConvertFlowIuToDisplay ( U_INT32 flow_iu , U_INT32 iu_scaling );
U_INT32 ConvertFlowDisplayToIu ( INT32 flow , U_INT32 iu_scaling );
INT32 ConvertVelIuToDisplay ( U_INT32 vel_iu , U_INT32 iu_scaling );
U_INT32 ConvertVelDisplayToIu ( INT32 vel , U_INT32 iu_scaling );
INT32 ConvertPresRateIuToDisplay ( U_INT32 pres_iu , U_INT16 dcm2_per_iu );
U_INT16 ConvertPresRateDisplayToIu ( INT32 pres , U_INT16 dcm2_per_iu );
INT32 ConvertFlowRateIuToDisplay ( U_INT32 flow_iu , U_INT32 iu_scaling );
U_INT32 ConvertFlowRateDisplayToIu ( INT32 flow , U_INT32 iu_scaling );
INT32 ConvertPresIuToDcu ( U_INT32 pres_iu , U_INT16 dcm2_per_iu );
U_INT16 ConvertPresDcuToIu ( INT32 pres , U_INT16 dcm2_per_iu );
INT32 ConvertFlowIuToDcu ( U_INT32 flow_iu , U_INT32 iu_scaling );
U_INT32 ConvertFlowDcuToIu ( INT32 flow , U_INT32 iu_scaling );
INT32 ConvertVelIuToDcu ( U_INT32 vel_iu , U_INT32 iu_scaling );
U_INT32 ConvertVelDcuToIu ( INT32 vel , U_INT32 iu_scaling );
INT32 ConvertPresRateIuToDcu ( U_INT32 pres_iu , U_INT16 dcm2_per_iu );
U_INT16 ConvertPresRateDcuToIu ( INT32 pres , U_INT16 dcm2_per_iu );
INT32 ConvertFlowRateIuToDcu ( U_INT32 flow_iu , U_INT32 iu_scaling );
U_INT32 ConvertFlowRateDcuToIu ( INT32 flow , U_INT32 iu_scaling );
#define PRES_UNITS_CONVERTION  100
U_INT32 GetPresUnitsConversion();
void BeginMethodInstall ();
void EndMethodInstall ();
BIT8 DoingMethodInstall ();
UI_ERR ZeroAllPresSensors( );
float Determinate( float matrix[], INT16 rank );
UI_ERR SaveThermisterConstants ( U_INT8 module_number, float v_25c, float dt, float dv );
UI_ERR SavePsParms( U_INT8 module_number, U_INT8 position, U_INT16 range_iu, U_INT16 dcm2_per_iu,
                  float offset, float span, float doffset_dt, float dspan_dt );
UI_ERR SaveFsConstants(  U_INT16 module,    GAS_TYPE gas,      float max_flow,
                         float alpha_low,   float alpha_high, float beta_low, float beta_high, float offset,
                         float switch_flow, float da_dt,      float db_dt,    float dvo_dt,    float ref_temp );
UI_ERR DoAFlowSensor( U_INT16 module,     GAS_TYPE gas,      float ref_flow, float max_flow,   float *temp, U_INT16 *counts,
                      float *alpha_low,   float *alpha_high, float *beta_low, float *beta_high, float *offset,
                      float *switch_flow, float *da_dt,      float *db_dt,    float *dvo_dt,    float *ref_temp );
UI_ERR DoAFlowSensorTry2( U_INT16 module, GAS_TYPE gas,      float ref_flow, float max_flow,   float *temp, U_INT16 *counts,
                      float *alpha_low,   float *alpha_high, float *beta_low, float *beta_high, float *offset,
                      float *switch_flow, float *da_dt,      float *db_dt,    float *dvo_dt,    float *ref_temp );
UI_ERR DoAFlowSensorTry3( U_INT16 module, GAS_TYPE gas,      float ref_flow, float max_flow,   float *temp, U_INT16 *counts,
                      float *alpha_low,   float *alpha_high, float *beta_low, float *beta_high, float *offset,
                      float *switch_flow, float *da_dt,      float *db_dt,    float *dvo_dt,    float *ref_temp );
UI_ERR RecalibFlow( U_INT16 module, GAS_TYPE gas_type );
U_INT16  CalcCrcValue ( U_INT32 *data_words );
UI_ERR SavePurgeRegParms ( U_INT8 module, GAS_TYPE gas, float flow, float df_dp );
UI_ERR GetPurgeRegWords ( U_INT8 module, GAS_TYPE gas, INT32 *flow_word, INT32 *df_dp_word );
UI_ERR  GetPurgeRegParms ( U_INT8 module, INT32 *data_words );
UI_ERR  FieldPurgeRegUpdate ( U_INT8 module, INT32 *data_words );
/* $Header: proto.h,v 2.3 03/06/24 12:26:30 przybyls Exp $ */
void MethodStatusStructUpdate( void );
void LoadDefaultInletSetpts(pINLET_STATUS  status );
void LoadDefaultColumnSetpts( pCOLUMN_STATUS  status );
BIT8 ColumnSourceOrOutletChanged( pCOLUMN_STATUS status );
void DefaultColumnIfHardwareChanged( pCOLUMN_STATUS status );
void LoadDefaultDetSetpts( pDETECTOR_STATUS status );
void LoadDefaultAuxSetpts( pAUX_STATUS status );
void SetPneuDefaultSetpts(void);
INT32 yGetInletPsRange( void *status, INT32 unused );
INT32 yGetDetPsRange( void *status, INT32 gas_num );
INT32 yGetPneuAuxPsRange( void *status, INT32 unused );
void CheckPneuConfigInWkfile ( void );
void SavePneuConfigInWkfile ( void );
void InstallPneuConfigInWkfile ( void );
void CheckCPFInletConfigInWkfile(void);
#define I_TERM_INDEX  0
#define P_TERM_INDEX  1
#define D_TERM_INDEX  2
#define NL_TERM_INDEX 3
#define PRES_CHANNEL  0
#define FLOW_CHANNEL  1
#define ALT_CHANNEL   2
U_INT16 GetFactInletPidEepromAddress( U_INT16 type, GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
U_INT16 GetUserInletPidEepromAddress( GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
U_INT16 GetFSensorParmAddress( INLET_TYPE type, GAS_TYPE gas, U_INT8 parm_num );
U_INT16 GetInletParmAddress( GAS_TYPE gas, U_INT8 parm_num );
U_INT16 GetJillParmAddress( GAS_TYPE gas, U_INT8 parm_num );
void WriteInletMaxFlows( U_INT8 module_number );
BIT8 InitInletEEPROM ( U_INT8 module, U_INT16 type, U_INT16 range, U_INT16 scale, U_INT16 snh, U_INT16 snl, U_INT16 bd );
typedef struct { U_INT8 cmd; U_INT16 source; U_INT16 dest; U_INT16 extra; } UPDATE_TABLE_ENTRY, *pUPDATE_TABLE;
#define END        0
#define COPY_WORD  1
#define COPY_ROW   2
#define COPY_BLOCK 3
#define INIT_WORD  4
#define INIT_ROW   5
#define INIT_BLOCK 6
#define MUL_DIV    7
#define SAVE_WORD  8
#define RESTORE_WORD 9
#define SKIP_EQ    10       /*  skip n lines if eq     SKIP_EQ      value,       location,           skip_count */
#define SKIP_NE    11       /*  skip n lines if ne     SKIP_NE      value,       location,           skip_count */
#define SHIFT_32   12       /*  SHIFT_32   shift count, &high word, &low word */
#define INIT_PID   13       /*  INIT_PID   100psi pid value, location, ps to use for scaling */
#define RECALIB    14
#define CALC_CKSUM 15
#define NO_OP      16
#define TO_SCCM    17
#define SKIP       18
#define SKIP_IF_OK 19
void UpdateEeprom( U_INT16 module_number, pUPDATE_TABLE table );
pUPDATE_TABLE GetSSPidTable( U_INT16 modul_num );
void UpdateInletEeprom0107( pINLET_STATUS status );
void UpdateInletEeprom0109( pINLET_STATUS status );
void UpdateInletEeprom010A( pINLET_STATUS status );
void UpdateInletEeprom010B( pINLET_STATUS status );
void UpdateInletEeprom010C( pINLET_STATUS status );
void UpdateInletEeprom010D( pINLET_STATUS status );
void UpdateInletEeprom010E( pINLET_STATUS status );
void UpdateInletEeprom010F( pINLET_STATUS status );
void WriteInletPurgeFlows( U_INT8 module_number );
void WriteInletPIDs( U_INT8 module_number, U_INT16 type );
UI_ERR GetInletEepromDef (U_INT16 address, BIT8 *definition );
UI_ERR GetJillEepromDef (U_INT16 address, BIT8 *definition );
void UpdateInletEeprom0110( pINLET_STATUS status );
void UpdateInletEeprom0111( pINLET_STATUS status );
void UpdateInletEeprom0112( pINLET_STATUS status );
void UpdateInletEeprom0113( pINLET_STATUS status );
void UpdateInletEeprom0114( pINLET_STATUS status );
void UpdateInletEeprom0115( pINLET_STATUS status );
void UpdateInletEeprom0116( pINLET_STATUS status );
void UpdateInletEeprom0117( pINLET_STATUS status );
void UpdateInletEeprom0118( pINLET_STATUS status );
void UpdateInletEeprom0200( pINLET_STATUS status );
void UpdateInletEeprom0201( pINLET_STATUS status );
U_INT16 GetFactDetPidEepromAddress( GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
U_INT16 GetUserDetPidEepromAddress( GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
extern const U_INT16 Frit_Parm_Address_Table [/*gas*/][5/*Parms*/][3/*ch*/];
void WriteDetMinFlows( U_INT8 module_number );
void WriteDetMaxFlows( U_INT8 module_number );
void WriteDetPsRange( U_INT8 module_number );
BIT8 InitDetEEPROM ( U_INT8 module, U_INT16 type, U_INT16 range, U_INT16 scale, U_INT16 snh, U_INT16 snl, U_INT16 bd );
void UpdateDetectorEeprom0107( pDETECTOR_STATUS status );
void WriteDetPIDs ( U_INT8 module, EEPROM_DET_TYPE type );
void UpdateDetEeprom109( pDETECTOR_STATUS status );
void UpdateDetEeprom10A( pDETECTOR_STATUS status );
void UpdateDetEeprom10B( pDETECTOR_STATUS status );
void UpdateDetEeprom10C( pDETECTOR_STATUS status );
UI_ERR GetDetEepromDef (U_INT16 address, BIT8 *definition );
void UpdateDetEeprom10D( pDETECTOR_STATUS status );
void UpdateDetEeprom10E( pDETECTOR_STATUS status );
void UpdateDetEeprom10F( pDETECTOR_STATUS status );
void UpdateDetEeprom110( pDETECTOR_STATUS status );
void UpdateDetEeprom111( pDETECTOR_STATUS status );
void UpdateDetEeprom200( pDETECTOR_STATUS status );
U_INT16 GetFactAuxPidEepromAddress( GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
U_INT16 GetUserAuxPidEepromAddress( GAS_TYPE gas, U_INT8 sensor_position, U_INT8 term );
BIT8 InitAuxEEPROM ( U_INT8 module, U_INT16 type, U_INT16 range, U_INT16 scale, U_INT16 snh, U_INT16 snl, U_INT16 bd );
void UpdateAuxEeprom109(  U_INT8 modul_nmbr );
void WriteAuxPsRange( U_INT8 module_number );
void UpdateAuxEeprom10A( U_INT8 modul_nmbr );
void WriteAuxPIDs ( U_INT8 module );
UI_ERR GetAuxEepromDef (U_INT16 address, BIT8 *definition );
void UpdateAuxEeprom10B( U_INT8 modul_nmbr );
void UpdateAuxEeprom10C( U_INT8 modul_nmbr );
void UpdateAuxEeprom10D( U_INT8 modul_nmbr );
void UpdateAuxEeprom10E( U_INT8 modul_nmbr );
void UpdateAuxEeprom200( U_INT8 modul_nmbr );
/*#pragma  SECTION PROG=rom3*/
void InitPneuKeys( void );
void FakeRealFormat ( INT32  num, U_INT32 scale, BIT8 *string );
void FakeIntFormat ( U_INT16  num, BIT8 *string );
void BuildStringImage( BIT8 *line1, BIT8 *line2, BIT8 *line3, BIT8 *line4 );
void StrCopy ( BIT8 *Source, BIT8 *Dest);
void Pneu_Keyboard (KEYCODE  Key );
/*#pragma  SECTION UNDO*/
void PneuFakeDisplay( void );
